mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
code style
This commit is contained in:
parent
c9da9bdd23
commit
7758fabc89
@ -85,11 +85,10 @@ class OAuthProvider extends AuthProviderBase {
|
|||||||
|
|
||||||
const { access_token, refresh_token, id_token } = resp.data;
|
const { access_token, refresh_token, id_token } = resp.data;
|
||||||
|
|
||||||
var payload = jwt.decode(access_token);
|
let payload = jwt.decode(access_token);
|
||||||
|
|
||||||
// Fallback to id_token in case the access_token is not a JWT
|
// Fallback to id_token in case the access_token is not a JWT
|
||||||
// https://www.oauth.com/oauth2-servers/access-tokens/
|
// https://www.oauth.com/oauth2-servers/access-tokens/
|
||||||
// https://github.com/dbgate/dbgate/issues/727
|
|
||||||
if (!payload && id_token) {
|
if (!payload && id_token) {
|
||||||
payload = jwt.decode(id_token);
|
payload = jwt.decode(id_token);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user