Skip to content

Commit

Permalink
add localhost to preferred url
Browse files Browse the repository at this point in the history
  • Loading branch information
LarryKwon committed Sep 15, 2024
1 parent c2bd624 commit 4cd1d20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/modules/auth/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class AuthController {
return res.redirect(next ?? '/');
}
req.session['next'] = next ?? '/';
const request_url = req.get('host') ?? 'otl.kaist.ac.kr';
const request_url = req.get('host') ?? 'localhost:8000';
console.log(request_url);
const { url, state } = this.ssoClient.get_login_params(request_url);
req.session['sso_state'] = state;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/auth/utils/sparcs-sso.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export class Client {
};
const preferred_url =
allowedPreferredUris[request_url] ||
'https://otl.sparcs.org/session/login/callback/';
'http:localhost:8000/session/login/callback/';
const params: Params = {
client_id: this.client_id,
state: state,
Expand Down

0 comments on commit 4cd1d20

Please sign in to comment.