using access token.

This commit is contained in:
Jason Kulatunga 2022-10-30 19:43:28 -07:00
parent 29e143c8c1
commit 52802323ee
2 changed files with 4 additions and 4 deletions

View File

@ -33,9 +33,9 @@ export class AuthSigninComponent implements OnInit {
const idpType = this.route.snapshot.paramMap.get('idp_type')
if(idpType){
const params = new URLSearchParams(window.location.hash.substring(1))
const idToken = params.get('id_token') // eyJhbGciOiJSUzI1...rest_of_ID_Token
const code = params.get('code') // eyJhbGciOiJSUzI1...rest_of_ID_Token
this.resetUrlOnCallback()
this.authService.IdpCallback(idpType, idToken).then(console.log)
this.authService.IdpCallback(idpType, code).then(console.log)
}
}

View File

@ -28,10 +28,10 @@ export class AuthService {
window.location.href = authorizeUrl.toString();
}
public async IdpCallback(idp_type: string, id_token: string) {
public async IdpCallback(idp_type: string, code: string) {
var payload = {
id_token: id_token
code: code
}
let fastenApiEndpointBase = GetEndpointAbsolutePath(globalThis.location,environment.fasten_api_endpoint_base)