mirror of
https://github.com/ente-io/ente.git
synced 2025-08-08 07:28:26 +00:00
Ren
This commit is contained in:
parent
d247cc6cad
commit
c035d5cafa
@ -26,3 +26,4 @@
|
||||
|
||||
#NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT = http://localhost:3002
|
||||
#NEXT_PUBLIC_ENTE_ACCOUNTS_ENDPOINT = http://localhost:3002
|
||||
#NEXT_PUBLIC_ENTE_PAYMENTS_ENDPOINT = http://localhost:3002
|
||||
|
@ -18,7 +18,7 @@ import {
|
||||
} from "@ente/shared/crypto/helpers";
|
||||
import type { B64EncryptionResult } from "@ente/shared/crypto/types";
|
||||
import { CustomError } from "@ente/shared/error";
|
||||
import { getAccountsURL, getEndpoint } from "@ente/shared/network/api";
|
||||
import { accountsAppURL, getEndpoint } from "@ente/shared/network/api";
|
||||
import InMemoryStore, { MS_KEYS } from "@ente/shared/storage/InMemoryStore";
|
||||
import {
|
||||
LS_KEYS,
|
||||
@ -166,7 +166,7 @@ const Page: React.FC<PageProps> = ({ appContext }) => {
|
||||
isTwoFactorPasskeysEnabled: true,
|
||||
});
|
||||
InMemoryStore.set(MS_KEYS.REDIRECT_URL, PAGES.ROOT);
|
||||
window.location.href = `${getAccountsURL()}/passkeys/flow?passkeySessionID=${passkeySessionID}&redirect=${
|
||||
window.location.href = `${accountsAppURL()}/passkeys/flow?passkeySessionID=${passkeySessionID}&redirect=${
|
||||
window.location.origin
|
||||
}/passkeys/finish`;
|
||||
return undefined;
|
||||
|
@ -10,7 +10,7 @@ import SingleInputForm, {
|
||||
type SingleInputFormProps,
|
||||
} from "@ente/shared/components/SingleInputForm";
|
||||
import { ApiError } from "@ente/shared/error";
|
||||
import { getAccountsURL } from "@ente/shared/network/api";
|
||||
import { accountsAppURL } from "@ente/shared/network/api";
|
||||
import InMemoryStore, { MS_KEYS } from "@ente/shared/storage/InMemoryStore";
|
||||
import localForage from "@ente/shared/storage/localForage";
|
||||
import { LS_KEYS, getData, setData } from "@ente/shared/storage/localStorage";
|
||||
@ -85,7 +85,7 @@ const Page: React.FC<PageProps> = ({ appContext }) => {
|
||||
isTwoFactorPasskeysEnabled: true,
|
||||
});
|
||||
setIsFirstLogin(true);
|
||||
window.location.href = `${getAccountsURL()}/passkeys/flow?passkeySessionID=${passkeySessionID}&redirect=${
|
||||
window.location.href = `${accountsAppURL()}/passkeys/flow?passkeySessionID=${passkeySessionID}&redirect=${
|
||||
window.location.origin
|
||||
}/passkeys/finish`;
|
||||
router.push(PAGES.CREDENTIALS);
|
||||
|
@ -34,13 +34,16 @@ export const getUploadEndpoint = () => {
|
||||
return `https://uploader.ente.io`;
|
||||
};
|
||||
|
||||
export const getAccountsURL = () => {
|
||||
const accountsURL = process.env.NEXT_PUBLIC_ENTE_ACCOUNTS_ENDPOINT;
|
||||
if (accountsURL) {
|
||||
return accountsURL;
|
||||
}
|
||||
return `https://accounts.ente.io`;
|
||||
};
|
||||
/**
|
||||
* Return the URL of the Ente Accounts app.
|
||||
*
|
||||
* Defaults to our production instance, "https://accounts.ente.io", but can be
|
||||
* overridden by setting the `NEXT_PUBLIC_ENTE_ACCOUNTS_ENDPOINT` environment
|
||||
* variable to a non-empty value.
|
||||
*/
|
||||
export const accountsAppURL = () =>
|
||||
process.env.NEXT_PUBLIC_ENTE_ACCOUNTS_ENDPOINT ||
|
||||
`https://accounts.ente.io`;
|
||||
|
||||
export const getAlbumsURL = () => {
|
||||
const albumsURL = process.env.NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT;
|
||||
|
Loading…
x
Reference in New Issue
Block a user