bjoluc / next-redux-cookie-wrapper

Sync a subset of your Redux state with cookies in Next.js :cookie: :sparkles:
MIT License
114 stars 4 forks source link

Question: Authentication #33

Closed bryanltobing closed 2 years ago

bryanltobing commented 2 years ago
bjoluc commented 2 years ago

You can use this library to store and parse the auth token in/from a cookie, yes. Whether you consider that secure depends on whether you trust cookies and your client/server side redux store (I'd recommend setting the secure flag for your cookie to avoid accidentally exposing it via plain HTTP). Using this library – to the best of my knowledge – won't introduce any attack surface compared to programmatically setting/reading an auth token cookie on the client and server, if that's what you mean.