Skip to content

Commit 4887c1f

Browse files
committed
chore(rainbowkit-wallets oauth): update urls to latest specs
1 parent 756f411 commit 4887c1f

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/rainbowkit-wallets/src/linkSaasOAuth.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe('linkSaasOAuth', () => {
4848
})
4949

5050
expect(createMock).toHaveBeenCalledWith(expect.anything(), { persist: false })
51-
expect((global.fetch as jest.Mock).mock.calls[0][0]).toBe('https://saas.example.com/auth/oauth/link')
51+
expect((global.fetch as jest.Mock).mock.calls[0][0]).toBe('https://saas.example.com/auth/oauth')
5252
const [, request] = (global.fetch as jest.Mock).mock.calls[0]
5353
expect(request.headers.Authorization).toBe('Bearer session-token')
5454
expect(localStorage.getItem('authToken')).toBeNull()

packages/rainbowkit-wallets/src/linkSaasOAuth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const linkSaasOAuth = async ({
4646
lastname = nameData[1]
4747
}
4848

49-
const response = await fetch(`${saasBackendUrl}/auth/oauth/link`, {
49+
const response = await fetch(`${saasBackendUrl}/auth/oauth`, {
5050
method: 'POST',
5151
headers: {
5252
'Content-Type': 'application/json',

packages/rainbowkit-wallets/src/wagmi/saasOauthConnector.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ describe('saasOAuthConnector', () => {
106106
await capturedParams?.createWallet?.()
107107

108108
const [, request] = (global.fetch as jest.Mock).mock.calls[0]
109-
expect((global.fetch as jest.Mock).mock.calls[0][0]).toBe('https://saas.example.com/auth/oauth/link')
109+
expect((global.fetch as jest.Mock).mock.calls[0][0]).toBe('https://saas.example.com/auth/oauth')
110110
expect(request.method).toBe('POST')
111111
expect(request.headers.Authorization).toBe('Bearer session-token')
112112
expect(localStorage.getItem('authToken')).toBeNull()

packages/rainbowkit-wallets/src/wagmi/saasOauthConnector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export function saasOAuthConnector(options: saasOauthConnectorOptions): CreateCo
6969
clearAuthStorageKeys()
7070
}
7171
const authToken = options.getAuthToken?.() || localStorage.getItem(STORAGE_TOKEN_NAME)
72-
const endpoint = mode === 'link' ? '/auth/oauth/link' : '/oauth/login'
72+
const endpoint = mode === 'link' ? '/auth/oauth' : '/oauth/login'
7373
const headers = authToken
7474
? { 'Content-Type': 'application/json', Authorization: `Bearer ${authToken}` }
7575
: {

0 commit comments

Comments
 (0)