Jump to content

Issues with integrating custom Identity Provider service to an Invision Community

Recommended Posts

Hi everyone,

We are currently integrating our custom Identity Provider service into an Invision Community. We have already registered and added a login client inside the "Login & Registration Methods" tab. We are using the Authorization Code flow to redirect our users on Sign In to our own Login page where they enter their credentials. After a successful login, they are redirected back to Invision Community with a valid authorization code added to the response including the state fields. 

Right after we are redirected back to Invision Community with the provided callback with auth code and state fields - "Redirect URI?code&state", we are getting an error "Something went wrong. Please try again." and the user is not being logged in. Although we have checked the Error Logs in the admin panel, we did not manage to find exactly why we are getting this error. There are a few more exception messages on the Log, e.x.:

2C122/1 The page you are trying to access is not available to guests, but may be available if you sign in.


2S119/1 The CSRF protection key did not match. This may indicate a plugin or theme is out of date. Please contact technical support for more information.

Is there anything we can do to get more info on why exactly we are getting this error when we are redirecting back the user to Invision Community?

Kind regards

Link to comment
Share on other sites

Sorry, its not clear exactly what it is you are using here. Is this somehting you have custom developed, or are you suing OAuth 2.0? Im asking as you mention the login & registration section, but it sounds very much like you are custom developing an SSO

Link to comment
Share on other sites

After the user is redirected to our site and gives their credentials there, we redirect them back to Invision Community while using the callback given to us when registering the OAuth2.0 client:

  •  The Redirect URI to use is https://{ourId}.invisionservice.com/oauth/callback/

Then we get the mentioned error above.

Link to comment
Share on other sites

We have been dealing with the same exact issue for a few months now. Here's the exception:



    [error] => invalid_grant

    [error_description] => Invalid grant: code verifier is invalid





#0 /var/sites/forum/system/Login/Handler/OAuth2/OAuth2.php(607): IPS\_Log::log('Array\n(\n    [er...', 'oauth')

#1 /var/sites/forum/system/Login/Handler/OAuth2/OAuth2.php(389): IPS\Login\Handler\_OAuth2->_exchangeAuthorizationCodeForAccessToken('4a787f249d4de94...')

#2 /var/sites/forum/system/Login/Handler/OAuth2/OAuth2.php(170): IPS\Login\Handler\_OAuth2->_handleAuthorizationResponse(Object(IPS\Login))

#3 /var/sites/forum/system/Login/Login.php(339): IPS\Login\Handler\_OAuth2->authenticateButton(Object(IPS\Login))

#4 /var/sites/forum/applications/core/modules/front/system/login.php(59): IPS\_Login->authenticate()

#5 /var/sites/forum/system/Dispatcher/Controller.php(118): IPS\core\modules\front\system\_login->manage()

#6 /var/sites/forum/system/Dispatcher/Dispatcher.php(153): IPS\Dispatcher\_Controller->execute()

#7 /var/sites/forum/index.php(13): IPS\_Dispatcher->run()

#8 {main}

Edited by Michel Kohanim
Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

Sorry for the confusion here, looks like we have 2 users in this topic reporting the same problem and one of them got moved to a ticket. I have moved one for you to our ticket system so we can further investigate, you will receive further info in your email.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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