fix issue with localstorage of codeverifier
make sure we update the connected list when connection successful.
This commit is contained in:
parent
f03bdbd122
commit
81151c0318
|
@ -175,6 +175,10 @@ export class MedicalSourcesComponent implements OnInit {
|
|||
// window.location.reload();
|
||||
|
||||
console.log("source credential create response:", respData)
|
||||
//remove item from available sources list, add to connected sources.
|
||||
this.availableSourceList.splice(this.availableSourceList.indexOf(this.metadataSources[sourceType]), 1);
|
||||
this.connectedSourceList.push({source: respData, metadata: this.metadataSources[sourceType]})
|
||||
|
||||
},
|
||||
(err) => {
|
||||
delete this.status[sourceType]
|
||||
|
|
|
@ -50,7 +50,7 @@ export class LighthouseService {
|
|||
const codeChallenge = await Oauth.calculatePKCECodeChallenge(codeVerifier);
|
||||
const codeChallengeMethod = lighthouseSource.code_challenge_methods_supported[0]; // 'S256'
|
||||
|
||||
localStorage.setItem(`${lighthouseSource}:code_verifier`, codeVerifier)
|
||||
localStorage.setItem(`${sourceType}:code_verifier`, codeVerifier)
|
||||
localStorage.setItem(`${sourceType}:code_challenge`, codeChallenge)
|
||||
localStorage.setItem(`${sourceType}:code_challenge_method`, codeChallengeMethod)
|
||||
|
||||
|
|
Loading…
Reference in New Issue