Skip to content

Commit ebe5cae

Browse files
Fix apple auth scope
1 parent e7de3b1 commit ebe5cae

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/wallet/wdk/src/sequence/handlers/authcode.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,12 @@ export class AuthCodeHandler extends IdentityHandler implements Handler {
4545
isSignUp,
4646
})
4747

48+
const scope = this.signupKind === 'apple' ? 'name email' : 'openid profile email'
4849
const searchParams = new URLSearchParams({
4950
client_id: this.audience,
5051
redirect_uri: this.redirectUri,
5152
response_type: 'code',
52-
scope: 'openid profile email',
53+
scope,
5354
state,
5455
})
5556

packages/wallet/wdk/test/authcode.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ describe('AuthCodeHandler', () => {
311311

312312
expect(result).toContain('https://appleid.apple.com/auth/authorize?')
313313
expect(result).toContain('client_id=apple-client-id')
314+
expect(result).toContain('scope=name+email')
314315
})
315316

316317
it('Should create commitment without signer', async () => {

0 commit comments

Comments
 (0)