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