Feature/remove environment variable web auth rp (#3115)
* Remove environment variable WEB_AUTH_RP_ID * Update changelog
This commit is contained in:
parent
7a3237f1ff
commit
1f2f9f22f2
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Changed
|
||||
|
||||
- Integrated dividend into the transaction point concept in the portfolio service
|
||||
- Removed the environment variable `WEB_AUTH_RP_ID`
|
||||
|
||||
## 2.61.1 - 2024-03-06
|
||||
|
||||
|
@ -41,7 +41,7 @@ export class WebAuthService {
|
||||
) {}
|
||||
|
||||
get rpID() {
|
||||
return this.configurationService.get('WEB_AUTH_RP_ID');
|
||||
return new URL(this.configurationService.get('ROOT_URL')).hostname;
|
||||
}
|
||||
|
||||
get expectedOrigin() {
|
||||
|
@ -3,7 +3,7 @@ import { DEFAULT_ROOT_URL } from '@ghostfolio/common/config';
|
||||
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { DataSource } from '@prisma/client';
|
||||
import { bool, cleanEnv, host, json, num, port, str } from 'envalid';
|
||||
import { bool, cleanEnv, host, json, num, port, str, url } from 'envalid';
|
||||
|
||||
@Injectable()
|
||||
export class ConfigurationService {
|
||||
@ -48,14 +48,13 @@ export class ConfigurationService {
|
||||
REDIS_PASSWORD: str({ default: '' }),
|
||||
REDIS_PORT: port({ default: 6379 }),
|
||||
REQUEST_TIMEOUT: num({ default: 2000 }),
|
||||
ROOT_URL: str({ default: DEFAULT_ROOT_URL }),
|
||||
ROOT_URL: url({ default: DEFAULT_ROOT_URL }),
|
||||
STRIPE_PUBLIC_KEY: str({ default: '' }),
|
||||
STRIPE_SECRET_KEY: str({ default: '' }),
|
||||
TWITTER_ACCESS_TOKEN: str({ default: 'dummyAccessToken' }),
|
||||
TWITTER_ACCESS_TOKEN_SECRET: str({ default: 'dummyAccessTokenSecret' }),
|
||||
TWITTER_API_KEY: str({ default: 'dummyApiKey' }),
|
||||
TWITTER_API_SECRET: str({ default: 'dummyApiSecret' }),
|
||||
WEB_AUTH_RP_ID: host({ default: 'localhost' })
|
||||
TWITTER_API_SECRET: str({ default: 'dummyApiSecret' })
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -42,5 +42,4 @@ export interface Environment extends CleanedEnvAccessors {
|
||||
TWITTER_ACCESS_TOKEN_SECRET: string;
|
||||
TWITTER_API_KEY: string;
|
||||
TWITTER_API_SECRET: string;
|
||||
WEB_AUTH_RP_ID: string;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user