Skip to content

Instantly share code, notes, and snippets.

@adnanhz
Created June 14, 2019 11:51
Show Gist options
  • Save adnanhz/3834c18d6290f726dfafbcdd4032a59b to your computer and use it in GitHub Desktop.
Save adnanhz/3834c18d6290f726dfafbcdd4032a59b to your computer and use it in GitHub Desktop.
<?php
[...]
$user = $this->createUserIfNotExists($request);
Auth::login($user);
$token = $user->createToken("Personal Access Client")->accessToken;
if ($request->custom_content_url) {
return redirect()->away($request->custom_content_url."&username=".Auth::user()->username."&token=".$token);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment