Understanding what is the process of "secret base64 encoded" when user click on the tick button

Can you post the code you are using to generate your token?