adonisjs / ally

AdonisJS Social Authentication Provider
MIT License
158 stars 54 forks source link

Ally GoogleToken with idToken mapping is wrong #140

Closed frogconn closed 1 year ago

frogconn commented 1 year ago

On idToken mapping is wrong name from google authen

image

After login success and get user from google with

const user = await google.user()

user.token.idToken is undefined but get from key "id_token" with user.token['id_token'] value is collected.

image

RomainLanz commented 1 year ago

@thetutlage Should we change the token's payload's typing or casing?

thetutlage commented 1 year ago

I think, we should read id_token from the response and set it as idToken in the value we return. So that we have consistent camelCase fields everywhere. Happy to accept a PR for the same