feat: improve authentication and cookie management
- Updated Docker and Turbo configuration to include more environment variables - Modified API configuration to support dynamic cookie and CORS settings - Enhanced user authentication flow with optional device ID and automatic generation - Refactored login, register, and logout resolvers to handle device management - Updated GraphQL schema to make device ID optional - Improved web application logout and authentication handling - Simplified client-side GraphQL mutations for login and registration
This commit is contained in:
parent
d29d116214
commit
f9c6230101
15 changed files with 190 additions and 148 deletions
|
@ -11,6 +11,7 @@ const schema = z
|
|||
API_HOST: z.string(),
|
||||
API_PORT: z.coerce.number(),
|
||||
COOKIE_SECRET: z.string(),
|
||||
DATABASE_URL: z.string(),
|
||||
MINIO_ENDPOINT: z.string(),
|
||||
MINIO_PORT: z.coerce.number(),
|
||||
MINIO_ACCESS_KEY: z.string(),
|
||||
|
@ -34,6 +35,7 @@ const schema = z
|
|||
allowedOrigins: env.ALLOWED_ORIGINS.split(','),
|
||||
port: env.API_PORT,
|
||||
host: env.API_HOST,
|
||||
databaseUrl: env.DATABASE_URL,
|
||||
},
|
||||
minio: {
|
||||
endPoint: env.MINIO_ENDPOINT,
|
||||
|
@ -45,8 +47,8 @@ const schema = z
|
|||
region: env.MINIO_REGION,
|
||||
},
|
||||
token: {
|
||||
accessTokenExpiresIn: env.TOKEN_ACCESS_EXPIRES_IN,
|
||||
refreshTokenExpiresIn: env.TOKEN_REFRESH_EXPIRES_IN,
|
||||
accessTokenExpiresIn: env.TOKEN_ACCESS_EXPIRES_IN * 1000,
|
||||
refreshTokenExpiresIn: env.TOKEN_REFRESH_EXPIRES_IN * 1000,
|
||||
secret: env.TOKEN_SECRET,
|
||||
},
|
||||
memc: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue