Skip to content

Multiple queries to oauth_access_tokens #347

@mmmert

Description

@mmmert

Hi, I'm pretty new to Passport. I realized when I hit a route with auth:api middleware oauth_access_tokens table gets queried twice. Is this normal behaviour or am I doing something wrong?

41 Prepare select * from oauth_access_tokens where oauth_access_tokens.id = ? limit 1
41 Execute select * from oauth_access_tokens where oauth_access_tokens.id = 'TOKEN' limit 1
41 Close stmt
41 Prepare select * from users where users.id = ? limit 1
41 Execute select * from users where users.id = '1' limit 1
41 Close stmt
41 Prepare select * from oauth_access_tokens where oauth_access_tokens.id = ? limit 1
41 Execute select * from oauth_access_tokens where oauth_access_tokens.id = 'TOKEN' limit 1
41 Close stmt
41 Prepare select exists(select * from oauth_clients where id = ? and revoked = ?) as exists
41 Execute select exists(select * from oauth_clients where id = '3' and revoked = '1') as exists

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions