File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,10 @@ import { getEnvVars } from "$lib/utils/env-vars.utils";
33const envVars = getEnvVars ( ) ;
44
55export const IDENTITY_SERVICE_URL = envVars . identityServiceUrl ;
6+ export const BETA_IDENTITY_SERVICE_URL =
7+ "https://beta.identity.internetcomputer.org/" ;
68export const OLD_MAINNET_IDENTITY_SERVICE_URL = "https://identity.ic0.app" ;
7- export const BETA_IDENTITY_SERVICE_URL = "https://beta.identity.ic0.app" ;
9+ export const OLD_BETA_IDENTITY_SERVICE_URL = "https://beta.identity.ic0.app" ;
810
911// The authentication expires after 60 minutes
1012export const AUTH_SESSION_DURATION = BigInt ( 60 * 60 * 1_000_000_000 ) ;
Original file line number Diff line number Diff line change 11import {
22 BETA_IDENTITY_SERVICE_URL ,
33 IDENTITY_SERVICE_URL ,
4+ OLD_BETA_IDENTITY_SERVICE_URL ,
45 OLD_MAINNET_IDENTITY_SERVICE_URL ,
56} from "$lib/constants/identity.constants" ;
67import { AuthClient } from "@icp-sdk/auth/client" ;
@@ -47,9 +48,11 @@ export const loadIdentity = async (): Promise<Identity | undefined> => {
4748
4849export const getIdentityProviderUrl = ( ) : string => {
4950 // If we are in mainnet in the old domain, we use the old identity provider.
50- if ( location . host . startsWith ( "beta ") ) return BETA_IDENTITY_SERVICE_URL ;
51- if ( location . host . endsWith ( ".ic0.app ") )
51+ if ( location . host . endsWith ( ".ic0.app ") ) {
52+ if ( location . host . startsWith ( "beta ") ) return OLD_BETA_IDENTITY_SERVICE_URL ;
5253 return OLD_MAINNET_IDENTITY_SERVICE_URL ;
54+ }
5355
56+ if ( location . host . startsWith ( "beta" ) ) return BETA_IDENTITY_SERVICE_URL ;
5457 return IDENTITY_SERVICE_URL ;
5558} ;
You can’t perform that action at this time.
0 commit comments