mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 04:48:53 +00:00
fix(server): remove default auth redirect url (#8140)
This commit is contained in:
@@ -18,7 +18,6 @@ import {
|
||||
OauthAccountAlreadyConnected,
|
||||
OauthStateExpired,
|
||||
UnknownOauthProvider,
|
||||
URLHelper,
|
||||
} from '../../fundamentals';
|
||||
import { OAuthProviderName } from './config';
|
||||
import { OAuthAccount, Tokens } from './providers/def';
|
||||
@@ -31,7 +30,6 @@ export class OAuthController {
|
||||
private readonly auth: AuthService,
|
||||
private readonly oauth: OAuthService,
|
||||
private readonly user: UserService,
|
||||
private readonly url: URLHelper,
|
||||
private readonly providerFactory: OAuthProviderFactory,
|
||||
private readonly db: PrismaClient
|
||||
) {}
|
||||
@@ -41,7 +39,7 @@ export class OAuthController {
|
||||
@HttpCode(HttpStatus.OK)
|
||||
async preflight(
|
||||
@Body('provider') unknownProviderName?: string,
|
||||
@Body('redirect_uri') redirectUri: string = this.url.home
|
||||
@Body('redirect_uri') redirectUri?: string
|
||||
) {
|
||||
if (!unknownProviderName) {
|
||||
throw new MissingOauthQueryParameter({ name: 'provider' });
|
||||
|
||||
Reference in New Issue
Block a user