Skip to content

Is Storing Access_Token in Server-Side Cookies a Best Practice for API Validation? #463

Open
@zuko-firelord

Description

@zuko-firelord

I am using Next.js 15 for the frontend and a Go backend. While reviewing the example of authorizer-nextjs, I noticed that the access_token is stored in a server-side cookie that can be use for validating API requests in middleware.
image

Is this approach secure and recommended?
If I decide not to store the access_token on server-side cookie, can I validate API requests using a session_token instead?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions