Guest User

Untitled

a guest
Oct 19th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. https://www.example.com/oauth/login
  2. &scope=user.profile,user.messages
  3.  
  4. $secret = 'Some derived code unique to that user that authenticated';
  5. $b64 = array('uuid' => 'The users ID', 'scopes' => array('Contains the scopes the user allowed'));
  6.  
  7. // Some code to store this key into the database cross-referenced to the uuid
  8.  
  9. die(json_encode(FirebaseJWTJWT::encode($b64, $secret)));
Add Comment
Please, Sign In to add comment