Jump to content
View in the app

A better way to browse. Learn more.

Invision Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[SOLVED] IPS custom OAuth2 error.

Featured Replies

Hello, I am building my own NodeJS OAuth2 server that services authentication from IPS.

However I am encountering some issues making it work. IPS constantly throws me error :

"The provider is not responding as expected. Check the application settings are correct and you have registered the correct Redirect URI."
 

IPS request is handled correctly in NodeJS server, and server returns these in body:

access_token:"0000000000000000000000000000000000000000"
refresh_token:"0000000000000000000000000000000000000000"
token_type:"Bearer"

It also sets these headers as required by OAuth2 RFC

  res.set("Cache-Control", "no-store");
  res.set("Pragma", "no-cache");

However, it doesn't work. I tried redirecting it to /oauth/callback as required by IPS, and it still shows the same error.

Any ideas what I could be doing wrong?

 

Edited by NobodyLTU

What kind of grant type are you attempting to configure?

That error message would be shown (and the actual exception message should be displayed at the end of the sentence actually) if

1) There is a HTTP communication error

2) You are setting up a password grant and the provider is not returning error=invalid_grant in the response

  • Author

Grant is Resource Owner Password Credentials ("password")

What I do receive when I manually post for token :

image.thumb.png.78a0e2e79771676edc66b149bde02f69.png

 

or this (if i am not setting the redirect)

image.thumb.png.c62a9e6fa3d858ec8a796717971400b3.png

 

This would also be the information IPS receives.

 

Edited by NobodyLTU

When you go to save the settings a test is performed using "username" as the username and "password" as the password. The software is expecting these are invalid, and subsequently is expecting to get an invalid_grant error response, which is not happening. Are you treating "username" and "password" (as the username/password combination) special on your end somehow, or are these somehow valid credentials by chance?

  • Author
8 hours ago, bfarber said:

When you go to save the settings a test is performed using "username" as the username and "password" as the password. The software is expecting these are invalid, and subsequently is expecting to get an invalid_grant error response, which is not happening. Are you treating "username" and "password" (as the username/password combination) special on your end somehow, or are these somehow valid credentials by chance?

Yes, that was the error! Thank you very much. Not sure if I have to create a new topic but what data does the IPS expect from User Information Endpoint? 

I am sending image.png.907ea02b0adcc9fe205ec19a418cde81.png 

However IPS says:

image.thumb.png.27da5ce21cee4aed0689532f1bd0236b.png

When trying to sign in.

 

I noticed that it does same request twice, once with access_token in query string and other with access_token in body. Is there are special way it needs to be handled for IPS?

Edited by NobodyLTU

It uses the header first, and falls back to trying the query string if that does not succeed.

The only data necessary is a unique user ID ('sub' in your example). It sounds like the software is not picking this up from the user info endpoint for some reason, although without looking at it directly I can't say why from here. You may wish to submit a ticket for assistance.

  • Author
1 hour ago, bfarber said:

It uses the header first, and falls back to trying the query string if that does not succeed.

The only data necessary is a unique user ID ('sub' in your example). It sounds like the software is not picking this up from the user info endpoint for some reason, although without looking at it directly I can't say why from here. You may wish to submit a ticket for assistance.

Hey thanks again for response. I got it fully working. In IPS it says that to get user info data you have to fill in the fields with response[user_id] and etc... So whats what I did, response, response[name], response. But apparently you don't need to add response[ ], just sub, name, email. Don't know how I was confused by it, but anyways, it works!

Thank you again for the help!

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.