c# - Generate a Refresh Token -


i have work flow works this:

  1. user on mobile device uses login google work flow , gets token back.
  2. user passes id_token webapi endpoint.
  3. webapi validates token via google endpoint, saves user data database, , generates refresh , access tokens.
  4. when user needs use api, provide access token via bearer authentication header.
  5. if access token has expired or going expired, app provides refresh token , receives new access token.

this pretty standard workflow believe. stuck how generate secure refresh token. i'm using asp.net mvc 5 , love little direction in how generate refresh token. i'm having hard time finding refresh token format well. can generate access token using jwtsecuritytoken, jwtsecuritytokenhandler , securitytokendescriptor classes.

could simple using symmetrical encryption algorithm on json string , sending on wire?


Comments