-21
frontend-v2/src/config/auth.ts
-21
frontend-v2/src/config/auth.ts
···
1
-
/**
2
-
* OAuth configuration for the application.
3
-
*
4
-
* Environment variables should be defined in .env file:
5
-
* - VITE_AUTH_BASE_URL: Base URL of the OAuth server
6
-
* - VITE_OAUTH_CLIENT_ID: OAuth client ID
7
-
* - VITE_OAUTH_CLIENT_SECRET: OAuth client secret (optional for public clients)
8
-
*/
9
-
10
-
export const oauthConfig = {
11
-
clientId: import.meta.env.VITE_OAUTH_CLIENT_ID || "",
12
-
clientSecret: import.meta.env.VITE_OAUTH_CLIENT_SECRET || "",
13
-
authBaseUrl: import.meta.env.VITE_AUTH_BASE_URL || "http://localhost:8081",
14
-
redirectUri:
15
-
import.meta.env.VITE_OAUTH_REDIRECT_URI ||
16
-
`${globalThis.location.origin}/oauth/callback`,
17
-
silentRedirectUri:
18
-
import.meta.env.VITE_OAUTH_SILENT_REDIRECT_URI ||
19
-
`${globalThis.location.origin}/silent-refresh`,
20
-
scopes: ["openid", "profile", "atproto", "repo:*"],
21
-
};