Skip to content

Commit

Permalink
some more info in client app
Browse files Browse the repository at this point in the history
  • Loading branch information
michielbdejong committed Mar 28, 2024
1 parent 205767b commit 320f097
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions phase-2/poc-2/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Client {
};
this.clientId = options.clientId;
this.clientSecret = options.clientSecret;
this.tokens = [];
this.tokens = {};
}

makeAuthorizeUrl(scope, state) {
Expand Down Expand Up @@ -51,11 +51,15 @@ class Client {
}
async makeCallbackScreen(urlStr) {
const code = this.getCodeFromCallback(urlStr);
const scope = this.getScopeFromCallback(urlStr);
const state = this.getStateFromCallback(urlStr);
const scopeInfo = await this.fetchScopeInfo(code);

console.log('scope info', scopeInfo);
// this.tokens[code] = scopeInfo;
this.tokens.push(scopeInfo);
this.tokens[code] = {
scopeInfo,
scope,
state
};
return `
<body style="background-color:#e3f2fa">
<h2>SURF Research Cloud</h2>
Expand Down

0 comments on commit 320f097

Please sign in to comment.