Jump to content

OAuth isAllowedToAuthenticate() on null exception


AndBlazing

Recommended Posts

Hey folks,

 

I'm getting the exception if click on Cancel or Return to button (http://prnt.sc/dxc782, http://prnt.sc/dxc6pr). Probably it's because of misconfiguration or something, although that seems to be cofigured properly.

 

if (function_exists('mcrypt_create_iv')) {
   $app['session']->set('oauth_token', bin2hex(mcrypt_create_iv(32, MCRYPT_DEV_URANDOM)));
} else {
   $app['session']->set('oauth_token', bin2hex(openssl_random_pseudo_bytes(32)));
}

$url = WHMCS_PATH . "oauth/authorize.php?client_id=" . WHMCS_CLIENT .
       "&response_type=code" .
       "&scope=openid%20profile%20email" .
       "&redirect_uri=" . $app['url_generator']->generate('oauth_code', [], UrlGenerator::ABSOLUTE_URL) .
       "&state=security_token%3D" . $app['session']->get('oauth_token') . "%26url%3D" . $app['url_generator']->generate('dashboard', [], UrlGenerator::ABSOLUTE_URL);;
return new RedirectResponse($url);

 

Could you advice please where is better to dig? :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated