https://stackoverflow.com/questions/1592534/what-is-token-based-authentication
Token based authentication is an incredibly deep body of knowledge and something that can't really be discussed casually in chat. Most programmers offload this authentication layer to a backend service anyway. I suggest reading up on the topic quite a bit as there's no quick and easy "Here's how you do token authentication"