Hello guys ! Is anyone using Ory with Next.js ? Mo...
# ory-network
b
Hello guys ! Is anyone using Ory with Next.js ? More exactly having getInitialProps requests which has to be authenticated ?
h
b
Okay, but for example if the token expires while doing a server side request, how can I regenerate the token ? Can I do that on the server side ?
I should be able to call the api for refresh token, right ?
m
Hey Tony, Ory Kratos is not using refresh tokens, that is a mechanism from OAuth2.0. I am writing something to explain that, if you like you can take a look a the preview - still needs some editing.
b
@User thank you ! I never used session cookies (or I didn’t know I was) but from what I understand they are available until you close tab / browser. So then when you came back to the website you are logged out ? Or you have a database where you store the cookie to resolve that ?
m
@User That is up to you, you can implement it how it fits your use case. For some applications it is best if the session ends when you close the app, for others it persists for a long time.