Ver código fonte

call iAmSmart api with local

master
Anna Ho 1 ano atrás
pai
commit
cd15a27ad5
2 arquivos alterados com 5 adições e 4 exclusões
  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 Ver arquivo

@@ -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 Ver arquivo

@@ -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;


Carregando…
Cancelar
Salvar