NextAuth.js Session Token Decoder Ruby Gem

If you ever find yourself in a situation where you need to decrypt the NextAuth.js session token on your Ruby backend, look no further than this gem. It’s specifically designed to make the decryption process easy and seamless.  The source code for this library has been extracted from Cooper Pet Care’s code base.

Installation Instructions

Add this gem to your Gemfile:

gem 'next-auth-session-token-decoder', '~> 0.1.0', require: 'next_auth_decoder' 

and run `bundle install`.


token = 'eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0VxVkx9tG5eLKexs'

​options = {
  info: 'NextAuth.js Generated Encryption Key',
  secret: 'super-secret-key',
​, options).decode
  "username"=>"Test username",

Github Repository


Other Libraries

You are welcome to explore additional libraries that we have created by visiting this page.