Skip to content

Commit 64a6fd7

Browse files
authored
Added redirectUri param in auth_start.html file (#2843)
* Added the redirect uri param check to enable ios e2e test * Added the redirect uri param check to enable ios e2e test
1 parent 8c2d4d9 commit 64a6fd7

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

apps/teams-test-app/src/public/auth_start.html

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head>
44
<h2 style="font-size: 40px">Starting auth</h2>
@@ -11,6 +11,7 @@ <h2 style="font-size: 40px">Starting auth</h2>
1111
const authId = params.get('authId');
1212
const method = params.get('oauthRedirectMethod');
1313
const redirectUrl = params.get('hostRedirectUrl');
14+
const redirect_uri = params.get('redirect_uri');
1415
const hostName = params.get('hostName');
1516
const state = `{"authId":"${authId}","method":"${method}","hostName":"${hostName}"}`;
1617

@@ -19,8 +20,12 @@ <h2 style="font-size: 40px">Starting auth</h2>
1920
}
2021

2122
const getRedirectUri = () => {
22-
const idx = window.location.href.lastIndexOf('/');
23-
return `${window.location.href.slice(0, idx)}/auth_end.html`;
23+
if (redirect_uri) {
24+
return redirect_uri;
25+
} else {
26+
const idx = window.location.href.lastIndexOf('/');
27+
return `${window.location.href.slice(0, idx)}/auth_end.html`;
28+
}
2429
};
2530

2631
// Redirect to auth_end page if its mockOauth for testing

0 commit comments

Comments
 (0)