Support %23access_token in redirect URL in addition to #access_token - fixes sign-in on Chrome/iOS; resolves https://github.com/bbc/microbit-extras/issues/1346
This commit is contained in:
Родитель
d29f833c68
Коммит
cacba7031d
|
@ -6000,6 +6000,8 @@ module TDev
|
|||
{
|
||||
if (h == "#") h = "#" + TDev.hubHash;
|
||||
|
||||
h = h.replace(/%23/g, "#")
|
||||
|
||||
var i = h.indexOf("#access_token=");
|
||||
if (i != -1) {
|
||||
if(!Cloud.parseAccessToken(h,
|
||||
|
|
|
@ -29,7 +29,7 @@ module TDev.Login
|
|||
hereUrl = hereUrl.replace(/#.*/, "") + "#" + hash
|
||||
}
|
||||
var url = Cloud.getServiceUrl() + "/oauth/dialog?response_type=token&client_id=" +
|
||||
encodeURIComponent(Cloud.lite ? "webapp2" : "webapp") +
|
||||
encodeURIComponent("webapp3") +
|
||||
"&redirect_uri=" + encodeURIComponent(hereUrl) +
|
||||
"&identity_provider=" + encodeURIComponent(Cloud.getIdentityProvider() || "") +
|
||||
"&state=" + encodeURIComponent(Cloud.oauthStates()[0]) + addParameters;
|
||||
|
|
Загрузка…
Ссылка в новой задаче