Created
October 14, 2022 07:03
-
-
Save furkanaydgn/cc244a17779bd7498e1321a1aa1ef543 to your computer and use it in GitHub Desktop.
signIn()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function signIn() { | |
const signInParameters = { | |
authRequestOption: [HMSCommonTypes.AuthRequestOption.SCOPE_ID_TOKEN, HMSCommonTypes.AuthRequestOption.SCOPE_ACCESS_TOKEN, HMSCommonTypes.AuthRequestOption.SCOPE_CARRIER_ID], | |
authParam: HMSCommonTypes.AuthParams.DEFAULT_AUTH_REQUEST_PARAM, | |
authIdTokenSignAlg: HMSCommonTypes.AuthIdTokenSignAlg.PS256 | |
} | |
const packageName = HMSCommonTypes.PackageName.ACCOUNT; | |
const res = await HMSAccountAuthService.signIn(signInParameters, packageName); | |
accessToken = res.accessToken; | |
if (accessToken != null) { | |
window.location = "movie_page.html"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment