Skip to content

Commit 118683a

Browse files
Update apple auth scope
1 parent 0b63113 commit 118683a

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

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

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

48-
const scope = this.signupKind === 'apple' ? 'name email' : 'openid profile email'
4948
const searchParams = new URLSearchParams({
5049
client_id: this.audience,
5150
redirect_uri: this.redirectUri,
5251
response_type: 'code',
53-
scope,
5452
state,
53+
...(this.signupKind === 'apple' ? {} : { scope: 'openid profile email' }),
5554
})
5655

5756
return `${this.oauthUrl}?${searchParams.toString()}`

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ describe('AuthCodeHandler', () => {
312312
expect(result).toContain('https://appleid.apple.com/auth/authorize?')
313313
expect(result).toContain('client_id=apple-client-id')
314314
const resultUrl = new URL(result)
315-
expect(resultUrl.searchParams.get('scope')).toBe('name email')
315+
expect(resultUrl.searchParams.has('scope')).toBe(false)
316316
})
317317

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

0 commit comments

Comments
 (0)