Przeglądaj źródła

call iAmSmart api with local

master
Anna Ho 1 rok temu
rodzic
commit
cd15a27ad5
2 zmienionych plików z 5 dodań i 4 usunięć
  1. +3
    -2
      src/pages/authentication/RegisterCustom.js
  2. +2
    -2
      src/pages/authentication/auth-forms/AuthLoginCustom.js

+ 3
- 2
src/pages/authentication/RegisterCustom.js Wyświetl plik

@@ -20,6 +20,7 @@ const RegisterCustom = () => {

const [isPopUp, setIsPopUp] = React.useState(false);
const intl = useIntl();
const { locale } = intl;

const registerWithIAmSmart = () => {
setIsPopUp(true);
@@ -41,7 +42,7 @@ const RegisterCustom = () => {
+"&source=" + getBowserType()
+"&redirectURI="+encodeURIComponent(callbackUrl)
+"&scope="+encodeURIComponent("eidapi_auth eidapi_profiles")
+"&lang=zh-HK"//en-US, zh-HK, or zh-CN
+"&lang="+(locale === 'en' ?"en-US":locale === 'zh-HK' ?"zh-HK":"zh-CN")
//+"&state="
+"&brokerPage=false"
window.location.assign(url);
@@ -55,7 +56,7 @@ const RegisterCustom = () => {
+"&source=" + getBowserType()
+"&redirectURI="+encodeURIComponent(callbackUrl)
+"&scope="+encodeURIComponent("eidapi_auth eidapi_profiles")
+"&lang=zh-HK"//en-US, zh-HK, or zh-CN
+"&lang="+(locale === 'en' ?"en-US":locale === 'zh-HK' ?"zh-HK":"zh-CN")
//+"&state="
+"&brokerPage=true"
window.location.assign(url);


+ 2
- 2
src/pages/authentication/auth-forms/AuthLoginCustom.js Wyświetl plik

@@ -205,7 +205,7 @@ const AuthLoginCustom = () => {
+ "&source=" + getBowserType()
+ "&redirectURI=" + encodeURIComponent(callbackUrl)
+ "&scope=" + encodeURIComponent("eidapi_auth eidapi_profiles")
+ "&lang=zh-HK"//en-US, zh-HK, or zh-CN
+"&lang="+(locale === 'en' ?"en-US":locale === 'zh-HK' ?"zh-HK":"zh-CN")
//+"&state="
+ "&brokerPage=false"
window.location=url;
@@ -237,7 +237,7 @@ const AuthLoginCustom = () => {
+ "&source=" + getBowserType()
+ "&redirectURI=" + encodeURIComponent(callbackUrl)
+ "&scope=" + encodeURIComponent("eidapi_auth eidapi_profiles")
+ "&lang=zh-HK"//en-US, zh-HK, or zh-CN
+"&lang="+(locale === 'en' ?"en-US":locale === 'zh-HK' ?"zh-HK":"zh-CN")
//+"&state="
+ "&brokerPage=true"
window.location=url;


Ładowanie…
Anuluj
Zapisz