File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,15 +2,15 @@ import { create_base_client } from "../base_client";
22import { AuthStrategyBuilder } from "./types" ;
33
44
5- type TokenExchange = { token :string , app_id :string }
5+ type TokenExchange = { access_token :string , app_id :string }
66
77const 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
1616export 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 ( ) => {
You can’t perform that action at this time.
0 commit comments