We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e16ad57 + 67f1a9f commit a90d182Copy full SHA for a90d182
src/callback-endpoint.ts
@@ -45,7 +45,7 @@ export const createCallbackEndpoint = (
45
let access_token: string;
46
47
if (pluginOptions.getToken) {
48
- access_token = pluginOptions.getToken(code);
+ access_token = await pluginOptions.getToken(code);
49
} else {
50
const tokenResponse = await fetch(pluginOptions.tokenEndpoint, {
51
method: "POST",
src/types.ts
@@ -115,7 +115,7 @@ export interface PluginTypes {
115
* Function to get token from the OAuth providers.
116
* If its not provided default will be used.
117
*/
118
- getToken?: (code: string) => string;
+ getToken?: (code: string) => string | Promise<string>;
119
120
/**
121
* Redirect users after successful login.
0 commit comments