Fixes Backend OAuth2 Endpoint
This commit is contained in:
@@ -49,7 +49,6 @@
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
|
||||
.separator-line {
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
backendPath: '/api'
|
||||
backendPath: '/api',
|
||||
backendOAuthPath: 'https://api.hideyoshi.com.br'
|
||||
};
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
|
||||
export const environment = {
|
||||
production: false,
|
||||
backendPath: 'http://localhost:8070'
|
||||
backendPath: '/api',
|
||||
backendOAuthPath: 'http://localhost:8070'
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
7
src/proxy.conf.json
Normal file
7
src/proxy.conf.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"/api": {
|
||||
"target": "http://localhost:8070",
|
||||
"secure": false,
|
||||
"pathRewrite": {"^/api" : ""}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user