Skip to content

SPA and BFF with no sessions #214

Answered by ch4mpy
ASarco asked this question in Q&A
Discussion options

You must be logged in to vote

@ASarco this is an interesting question (and you obviously have thought about it already).

sending the encrypted token in a cookie

Actually it would be sending the encrypted tokens in a cookie (access, refresh and ID tokens). That's:

  • More data with each and every request.
  • More processing: serious encryption & decryption cost time and CPU.

What do you think about this?

To me, it is:

  • Over complicated. It requires to provide with:
    • A custom authorized-client repository / service @Bean based on cookies instead of session.
    • Some encryption keys rotation.
  • Risky: sending tokens over the network, even encrypted, is more dangerous than keeping it in server memory.
  • Not necessarily a huge ga…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ASarco
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants