1

I want to construct a URL, per user for a set of users, which should be embedded with a access token so that the user can use the URL to login into the application and access a specific page without entering their credentials.

My questions is how we can generate the multiple access tokens (a token for a user) at one go and embed in the URLs (in encrypted form) and valid them when user tries to access the URL?

6
  • It is advisable to create a JToken in this scenario and add it to the headers part of the http request, so whenever you have headers, you try to decrypt it based on token generation logic and thus validate the user, If token is valid you can straight away navigate user to respective page, else just navigate to login page Commented Jan 5, 2021 at 6:58
  • yes, however, here in the case of the URL scenario, where the user can get to the specific page just by clicking on URL, the token can not be send as a part of the http request, right? Commented Jan 5, 2021 at 7:11
  • The user should at least login once, then you can create a token and carry it for further requests Commented Jan 5, 2021 at 7:18
  • yeah but requirement is like the users should be able to login into app without entering credentials. Flow is like another logged in user would select a set of users (existing users of the app) and share the URL with them. Is there any other better way to achieve this? Commented Jan 5, 2021 at 7:31
  • Ohhh, in this case I guess you need to append the token in the url only, so when ever the logged in user copies the url (make sure user need to copy from some place other than browser url), so whenever user shares it, token also will be shared in the url itself. so it will be validated. Note: Dont forget that the shared url does have information of the user who is already logged in. Commented Jan 5, 2021 at 7:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.