mirror of
https://github.com/trufflesecurity/xsshunter
synced 2025-02-16 05:18:36 +00:00
fixing redirect url
This commit is contained in:
parent
eaa1c4f7f9
commit
5b0a3c949f
1 changed files with 2 additions and 1 deletions
3
app.js
3
app.js
|
@ -275,6 +275,7 @@ async function get_app_server() {
|
|||
|
||||
app.get('/login', (req, res) => {
|
||||
const authUrl = client.generateAuthUrl({
|
||||
redirect_uri: `https://${process.env.HOSTNAME}/oauth-login`,
|
||||
access_type: 'offline',
|
||||
scope: ['email', 'profile'],
|
||||
prompt: 'select_account'
|
||||
|
@ -282,7 +283,7 @@ async function get_app_server() {
|
|||
res.redirect(authUrl);
|
||||
});
|
||||
|
||||
app.get('/callback', async (req, res) => {
|
||||
app.get('/oauth-login', async (req, res) => {
|
||||
const code = req.query.code;
|
||||
const {tokens} = await client.getToken(code);
|
||||
client.setCredentials(tokens);
|
||||
|
|
Loading…
Add table
Reference in a new issue