(email: string, id: string)
| 79 | |
| 80 | // create the jwt token with the user id and email |
| 81 | createToken(email: string, id: string) { |
| 82 | const payload = {email, id}; |
| 83 | const token = this.jwtService.sign(payload, {expiresIn: '30d'}); |
| 84 | return {token}; |
| 85 | } |
| 86 | // get id token from google |
| 87 | async getGoogleOAuthToken(code: string) { |
| 88 | const url = 'https://oauth2.googleapis.com/token'; |