Closed vinicius-batista closed 6 years ago
Did u modified the default foreign key?
In token scheme? Yes. I use auth method for attempt with refresh token and work correctly.
This error was throw when executing this method on Lucid Serializer. https://github.com/adonisjs/adonis-auth/blob/develop/src/Serializers/Lucid.js#L158
Can u share the database you are using?
I'm using PostgreSQL
Okay, so that seems to be the issue, PostgreSQL converts keys to lowercase when not in double quotes "
.
Lemme see what best I can do in this case
@vinicius-batista Fixed in https://github.com/adonisjs/adonis-lucid/commit/c7df2007a9294b4279187d4de293f47de65b845f
So, when I try to refresh an user token show a query exception:
error: column tokens.userid does not exist
Method try to access userid (all in lowercase) in tokens table, but the correct is userId. This error show only in generateForRefreshToken.Code example bellow.