Skip to content

Commit 5fa24c0

Browse files
committed
fix: access token exchange
1 parent 573c204 commit 5fa24c0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/api/strategies/oidc.strategy.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import { create_base_client } from "../base_client";
22
import { AuthStrategyBuilder } from "./types";
33

44

5-
type TokenExchange = {token:string, app_id:string}
5+
type TokenExchange = {access_token:string, app_id:string}
66

77
const exchangeGithubOidcToken = async(gh_token:string)=>{
88
const client = create_base_client()
99
const res = await client.post<TokenExchange>("/auth/github-oidc",{
1010
token:gh_token
1111
})
12-
const {token, app_id} = res.data
13-
return {token, app_id}
12+
const {access_token, app_id} = res.data
13+
return {access_token, app_id}
1414
}
1515

1616
export const oidc_strategy: AuthStrategyBuilder<{idToken:string}> = (
@@ -30,7 +30,7 @@ export const oidc_strategy: AuthStrategyBuilder<{idToken:string}> = (
3030
token_ex = ex
3131
}
3232
return {
33-
Authorization: `Bearer ${token_ex.token}`,
33+
Authorization: `Bearer ${token_ex.access_token}`,
3434
};
3535
},
3636
app_id: async () => {

0 commit comments

Comments
 (0)