Skip to content

Commit e04d1a4

Browse files
authored
Merge pull request #14 from OriginTrail/fix/oauth-token-generation
fix: incorrect scope when generating auth tokens
2 parents 8896fcf + 61cf754 commit e04d1a4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/plugin-oauth/src/makeProvider.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ export default function makeProvider({
193193

194194
return createAndSaveOAuthTokens(
195195
codeData.client.client_id,
196-
codeData.params.scopes ?? [],
196+
codeData.confirmation.scopes ?? [],
197197
codeData.params.resource,
198198
codeData.confirmation.includeRefreshToken,
199199
codeData.confirmation.extra,
@@ -290,10 +290,10 @@ export type OAuthStorageProvider = {
290290
confirmCode: (code: string, data: CodeConfirmationData) => Promise<void>;
291291
getCodeData: (code: string) => Promise<
292292
| {
293-
client: OAuthClientInformationFull;
294-
params: AuthorizationParams;
295-
confirmation: false | CodeConfirmationData;
296-
}
293+
client: OAuthClientInformationFull;
294+
params: AuthorizationParams;
295+
confirmation: false | CodeConfirmationData;
296+
}
297297
| undefined
298298
| null
299299
>;

0 commit comments

Comments
 (0)