Fix feedback @moufmouf
This commit is contained in:
parent
a4b8a8422f
commit
210a789aa4
8 changed files with 42 additions and 40 deletions
|
@ -3,7 +3,7 @@ import {
|
|||
OPID_CLIENT_ID,
|
||||
OPID_CLIENT_SECRET,
|
||||
OPID_CLIENT_ISSUER,
|
||||
OPID_CLIENT_REDIREC_URL,
|
||||
OPID_CLIENT_REDIRECT_URL,
|
||||
} from "../Enum/EnvironmentVariable";
|
||||
|
||||
class OpenIDClient {
|
||||
|
@ -15,7 +15,7 @@ class OpenIDClient {
|
|||
return new issuer.Client({
|
||||
client_id: OPID_CLIENT_ID,
|
||||
client_secret: OPID_CLIENT_SECRET,
|
||||
redirect_uris: [OPID_CLIENT_REDIREC_URL],
|
||||
redirect_uris: [OPID_CLIENT_REDIRECT_URL],
|
||||
response_types: ["code"],
|
||||
});
|
||||
});
|
||||
|
@ -38,7 +38,7 @@ class OpenIDClient {
|
|||
|
||||
public getUserInfo(code: string, nonce: string): Promise<{ email: string; sub: string; access_token: string }> {
|
||||
return this.initClient().then((client) => {
|
||||
return client.callback(OPID_CLIENT_REDIREC_URL, { code }, { nonce }).then((tokenSet) => {
|
||||
return client.callback(OPID_CLIENT_REDIRECT_URL, { code }, { nonce }).then((tokenSet) => {
|
||||
return client.userinfo(tokenSet).then((res) => {
|
||||
return {
|
||||
...res,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue