0

I have tried to run https://github.com/oktadeveloper/okta-jpaseto-example which works fine but the code for creating a token takes 2min+ and some runs have been 7min

I have also followed the video https://www.youtube.com/watch?v=aOyG68jvthM which also has that problem with token creation. this code is usually around the 2min mark

Link to core lib: https://github.com/paseto-toolkit/jpaseto

From my understanding paseto will create a token you give the user after they login. Which can be used to identify the user. But waiting 2min+ seems a long time.

1 Answers1

0

I had similar issue and in my case the problem was due to the fact that JPaseto uses SecureRandom. SecureRandom get it's randomness from /dev/random which can and will block if not enough entropy is available.

You can use tools like haveged to generate additional entropy on your system.

The installation should be simple enough (Ubuntu/Debian)

apt-get install haveged
update-rc.d haveged defaults
service haveged start

This answer may also provide some different solutions.