Jump to content

Token Authentication - Cookie question


mds1256

Recommended Posts

Hi

 

I am wanting to create a login for a portal I have created and want to use access tokens.

 

These tokens expire after 60 minutes when they need to refresh (refresh token will also be sent to the client).

 

How do I achieve this, when the authentication request succeeds (e.g. login with username and password) do I set a client side cookie that has the access_token and refresh_token values along with a cookie expiry?

 

Thanks

Link to comment
Share on other sites

???

 

You simply create a cookie FROM THE SERVER in the script that authenticates the access. Then wherever you need to check for a proper signon, in each script you simply check for the existence of that cookie. You can also store (perhaps) a value or two in the cookie if you need to know something about the user. DO NOT STORE any sensitive info in the cookie

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.