Question

i just want to ask what is the significance of using tokens? i always see some urls that has tokens with it e.g 'www.example.com/page?token=as91823010as8f0tqwe123141', can someone help me and explain to me what is the use of it, and when do i need to use it. Thanks in advance.

Was it helpful?

Solution

A "token" is generally used in computing as something to hand around that means something to someone. Yes, this is about as specific as you can get.

The value "as91823010as8f0tqwe123141" doesn't mean anything to you, the user. But it does mean something to the server at www.example.com. What exactly depends. Typically the value itself has no meaning at all. It's just a random value that refers to something stored on the server. It may be a login session. It may be a temporary search result. It may be anything at all.

A token is the equivalent of "here little boy, take this note to your father, he'll know what it means." You as the user are the carrier of the note, which doesn't mean anything to you, but does mean something to the recipient.

OTHER TIPS

This is very broad. Tokens can be used for a million things:

  • An id (token) to verify a user (can be combined with a check on IP-address)
  • An encrypted string (of combination of strings) to verify some data on the server
  • As a mode, some tokens may trigger different actions

You can also have a situation where you have an user_token and an verify_token. You could insert those in a connect class or something.

Many, many different possibilities, it all depends on the code processing it :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top