chore(server): remove deprecated endpoints (#6984)

* chore: remove deprecated endpoints

* chore: open api
This commit is contained in:
Jason Rasmussen
2024-02-08 16:57:54 -05:00
committed by GitHub
parent 198e8517e5
commit 90a7f16817
36 changed files with 168 additions and 2905 deletions
-23
View File
@@ -42,7 +42,6 @@ import {
OAuthAuthorizeResponseDto,
OAuthCallbackDto,
OAuthConfigDto,
OAuthConfigResponseDto,
SignUpDto,
mapLoginResponse,
mapUserToken,
@@ -201,28 +200,6 @@ export class AuthService {
return `${MOBILE_REDIRECT}?${url.split('?')[1] || ''}`;
}
async generateConfig(dto: OAuthConfigDto): Promise<OAuthConfigResponseDto> {
const config = await this.configCore.getConfig();
const response = {
enabled: config.oauth.enabled,
passwordLoginEnabled: config.passwordLogin.enabled,
};
if (!response.enabled) {
return response;
}
const { scope, buttonText, autoLaunch } = config.oauth;
const oauthClient = await this.getOAuthClient(config);
const url = oauthClient.authorizationUrl({
redirect_uri: this.normalize(config, dto.redirectUri),
scope,
state: generators.state(),
});
return { ...response, buttonText, url, autoLaunch };
}
async authorize(dto: OAuthConfigDto): Promise<OAuthAuthorizeResponseDto> {
const config = await this.configCore.getConfig();
if (!config.oauth.enabled) {