mirror of
https://github.com/trufflesecurity/xsshunter
synced 2024-11-24 13:23:04 +00:00
adding user record
This commit is contained in:
parent
29669d7db9
commit
32b310a09a
1 changed files with 1 additions and 1 deletions
2
app.js
2
app.js
|
@ -299,7 +299,7 @@ async function get_app_server() {
|
|||
const {tokens} = await client.getToken(code);
|
||||
client.setCredentials(tokens);
|
||||
const oauth2 = google.oauth2({version: 'v2', auth: client});
|
||||
const email = await oauth2.userinfo.v2.me.get();
|
||||
const email = await oauth2.userinfo.v2.me.get().data.email;
|
||||
const [user, created] = await Users.findOrCreate({ where: { 'email': email } });
|
||||
if(created){
|
||||
user.path = makeRandomPath(20);
|
||||
|
|
Loading…
Reference in a new issue