New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

next-auth-session-token-decoder

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-auth-session-token-decoder

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

NextAuth.js Session Token Decoder

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

gem install next-auth-session-token-decoder

Usage

token = 'eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0..VxVkx9tG5eLKexs-.GQ792tADkdL10q_EntQO6bu-QYgr2gIqx7RwfRzA7HkMMrQ8Bu5Bfgh5UjYnI6J9bnagd6C_eOoQTMypMkXynPX_ogEEwlxLZLTXgn2yFTIDZHFEyXlmV53_FRJ82BNoYLv76lVZuNJwYdID8R-2thjML2VE3AblcNn2KJNCreXMztPrN9-AwOlAHofK3Q.14-TZcu0Br4kS7IPWhlC8g'

options = {
  info: 'NextAuth.js Generated Encryption Key',
  secret: 'super-secret-key',
}

NextAuthDecoder::Token.new(token, options).decode
=>
{
  "email"=>"test@email.com",
  "username"=>"Test username",
  "iat"=>1678818018,
  "exp"=>1681410018,
  "sub"=>"2",
  "jti"=>"ef109254-6cc0-4939-8cd3-faf172cd790f"
}

RSpec

First install dependencies:

bundle install

Now you're ready to test it:

bundle exec rspec spec

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/cooperpetcare/next-auth-session-token-decoder.

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 14 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc