back-compat for accountless creds
This commit is contained in:
parent
45f8f640c8
commit
91cd5d87fd
|
@ -480,13 +480,15 @@
|
||||||
// info about the newly-discovered token
|
// info about the newly-discovered token
|
||||||
oldSession.token = OAUTH3.jwt.decode(oldSession.access_token).payload;
|
oldSession.token = OAUTH3.jwt.decode(oldSession.access_token).payload;
|
||||||
|
|
||||||
oldSession.token.sub = oldSession.token.sub || oldSession.token.acx.id;
|
oldSession.token.sub = oldSession.token.sub || (oldSession.token.acx||{}).id
|
||||||
|
|| ((oldSession.token.axs||[])[0]||{}).id;
|
||||||
oldSession.token.client_uri = clientUri;
|
oldSession.token.client_uri = clientUri;
|
||||||
oldSession.token.provider_uri = providerUri;
|
oldSession.token.provider_uri = providerUri;
|
||||||
|
|
||||||
if (oldSession.refresh_token) {
|
if (oldSession.refresh_token) {
|
||||||
oldSession.refresh = OAUTH3.jwt.decode(oldSession.refresh_token).payload;
|
oldSession.refresh = OAUTH3.jwt.decode(oldSession.refresh_token).payload;
|
||||||
oldSession.refresh.sub = oldSession.refresh.sub || oldSession.refresh.acx.id;
|
oldSession.refresh.sub = oldSession.refresh.sub || (oldSession.refresh.acx||{}).id
|
||||||
|
|| ((oldSession.refresh.axs||[])[0]||{}).id;
|
||||||
oldSession.refresh.provider_uri = providerUri;
|
oldSession.refresh.provider_uri = providerUri;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue