File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ export const createCallbackEndpoint = (
45
45
let access_token : string ;
46
46
47
47
if ( pluginOptions . getToken ) {
48
- access_token = pluginOptions . getToken ( code ) ;
48
+ access_token = await pluginOptions . getToken ( code ) ;
49
49
} else {
50
50
const tokenResponse = await fetch ( pluginOptions . tokenEndpoint , {
51
51
method : "POST" ,
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ export interface PluginTypes {
115
115
* Function to get token from the OAuth providers.
116
116
* If its not provided default will be used.
117
117
*/
118
- getToken ?: ( code : string ) => string ;
118
+ getToken ?: ( code : string ) => string | Promise < string > ;
119
119
120
120
/**
121
121
* Redirect users after successful login.
You can’t perform that action at this time.
0 commit comments