mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 20:35:59 +00:00
code style
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user