Fixes Backend OAuth2 Endpoint

This commit is contained in:
2022-11-11 02:30:30 -03:00
parent fbc485698d
commit dd38ed60e7
9 changed files with 34 additions and 14 deletions

View File

@@ -18,6 +18,8 @@ export class AuthService {
readonly BACKEND_PATH = environment.backendPath;
readonly BACKEND_OAUTH_PATH = environment.backendOAuthPath;
constructor(private http: HttpClient) { }
login(userAuthAtempt: User): void {
@@ -25,11 +27,11 @@ export class AuthService {
}
googleLogin() {
window.open(this.BACKEND_PATH + '/oauth2/authorization/google', '_self');
window.open(this.BACKEND_OAUTH_PATH + '/oauth2/authorization/google', '_self');
}
githubLogin() {
window.open(this.BACKEND_PATH + '/oauth2/authorization/github', '_self');
window.open(this.BACKEND_OAUTH_PATH + '/oauth2/authorization/github', '_self');
}
loginGoogleUser(p: any): void {
@@ -92,7 +94,7 @@ export class AuthService {
);
return this.http.get<User>(
this.BACKEND_PATH + '/login/oauth2/code/google',
this.BACKEND_OAUTH_PATH + '/login/oauth2/code/google',
{
withCredentials: true,
params: params
@@ -111,7 +113,7 @@ export class AuthService {
);
return this.http.get<User>(
this.BACKEND_PATH + '/login/oauth2/code/github',
this.BACKEND_OAUTH_PATH + '/login/oauth2/code/github',
{
withCredentials: true,
params: params