"Return to App" button in box's OAuth2 screen returns with an Error: invalid_client - ios

I've got the v2 API working in our iOS app, but have run into one issue with the login page that comes up. If a user taps the "Return to App" button, they get a page that says
Error: invalid_client
Under the Show Error Details disclosure it says
state=ok
Looking at the logs, it looks like tapping that link causes the view to try and load
https://api.box.com/oauth2/authorize?state=ok
Which then produces that screen. According to the v2 docs, we're supposed to leave the redirect_uri field in the app's entry on box.com's site empty. I'm not sure if this is a configuration issue, or whether I need to be doing something more in our app to handle that tap.

Thanks. We will be removing that shortly.

Related

I am unable to login to my overleaf account while using it on microsoft edge. I get a Recaptcha error

I am unable to login to my overleaf account. I receive the following error:
reCAPTCHA placeholder element must be empty
I tried clearing cache, cookies. A simple google search suggests me some script lines as solution to a similar issue of ReCaptcha. For instance this answer on stackoverflow. Error: ReCAPTCHA placeholder element must be empty. But I am not clear where to paste/run this script.
The solution you found is for using google recaptcha library, it's not suitable for your login issue.
To try to deal with the issue, first, you can check if you have installed any extension like Adblock in Edge. You can disable all the extensions in Edge and try again.
Second, when the error appears, you can open F12 devtools in Edge and find recaptcha file in Sources tab like below. Then you can press Ctrl+A to select all the codes in api.js?render=explicit and delect them all. Then press Ctrl+S to save the change and login again to see if it works.

Setting up Google Sheets for Developers with node.js, after allowing my API to view my spreadshhets, it redirects to a "Page not found"

I'm trying to get the Google Sheets API to work with node and I've got as far that it asks me to sign it with my Google account and the allow the app to view my Google Spreadsheets. After I press allow it redirects me to a Page not found saying "ERR_CONNECTION_REFUSED". In the URL it reads "code=4" but I can't find what this stands for. I'm currently stuck in my console waiting for a code from this page. .
My code is the exact same as on the API documentation but I had to change "credentials.installed" to just "credentials" because otherwise it didn't work.
Has it maybe something to do with my callback URIs? I have both "Authorised JavaScript origins" and Authorised redirect URIs" as just "http://localhost:8080".
My credentials.JSON looks like this
{
"client_id":"XXXX",
"project_id":"XXXX","auth_uri":"https://accounts.google.com/o/oauth2/auth",
"token_uri":"https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs",
"client_secret":"XXXX",
"redirect_uris":["http://localhost:8080"],
"javascript_origins":["http://localhost:8080"]
}
In summary: I get a "Page not found" instead of the code that you're supposed to paste to the console after I press the "Accept" button.
I selected "web application" instead of "desktop application". Just download credentials JSON and copy code directly from quick start and it will work. My bad.

How to troubleshoot Microsoft Graph authentication?

How do I go about troubleshooting login problem with the Microsoft Graph API?
I'm using the new nodejs-connect-rest-sample on node 6.9.1, and used the quick-start page to generate and an AppID. After pressing the "Connect to Microsoft Graph" button, and choosing my normal Hotmail account for login, I'm redirected to an error page saying:
We're unable to complete your request
Microsoft account is experiencing technical problems. Please try again later.
What's the next step in troubleshooting this sort of error?
The error page URL actually contains a query string with a more detailed explanation than the displayed web page does... In my case: https://login.live.com/err.srf?lc=1033#error=invalid_request&error_description=The+provided+value+for+the+input+parameter+'redirect_uri'+is+not+valid.+The+expected+value+is+'https://login.live.com/oauth20_desktop.srf'+or+a+URL+which+matches+the+redirect+URI+registered+for+this+client+application.&state=a9SlXZGisoIQrPQUbDHX732izad7LJzM
The login.live.com page should be able to display this more detail description, but currently fails to, but I'm going to mark this answered as far as a "next step", because I found I could correct the problem by changing the redirect URL registered for the app.

Google: Cannot create API credentials

In Google console API manager, if I click on "Credentials", a popup comes up up stating "Failed to load service accounts."
If I dismiss that and then try to "add credentials" and select "Oauth 2.0 Client ID" I get another popup that says "A required resource is not available."
When I dismiss that, the underlying page has an exclamation icon and says "Failed to load".
This happening to anyone else? Just started failing this morning.
It looks like it may have been a temporary block. I was having the same issues earlier today, but this afternoon I was able to get past the warning messages. I didn't do anything special outside of refreshing the page (which I did try earlier) and the errors didn't come up, leading me to believe there was some service disruption, but status.cloud.google.com only reported a Google Compute Engine issue.

Invalid Facebook token

I'm having some trouble handling Facebook errors.
My app displays a page that tells users they've blocked the app when the login fails.
This page tells the users to go to settings>>privacy>>facebook and unblock the app.
I navigate to this page if the sessionStageChanged method contains an error.
I am however noticing a problem when a user changes their password, which will invalidate the iOS Facebook integration login, this will off course result in the error message not being correct anymore.
I've created another error page that tells the user that their password within ios integration has expired but I'm having trouble to figure out when I need to navigate to it.
-Both the different types of failure return Facebook error 2, which is a pretty generic error so I can't find what caused the problem from this error code.
-I've found another answer on here that used the [FBSession renewSystemCredentials] method but I am noticing that this will also return the ACAccountCredentialRenewResultFailed || Rejected error in both cases so this also won't work.
-I found the official documentation with this page: https://developers.facebook.com/docs/facebook-login/testing-your-login-flow/ but this does not have a solution only an explaination.
What should I do in this case?
How do I now when to navigate to the app blocked page and when to navigate to the password changed page?
I'm using Facebook SDK version: 3.10.0.
Thanks in advance!
Thanks for the comments.
After Ming Li's answer I found some stuff on this page: https://developers.facebook.com/docs/ios/errors
But after testing it in my app the Facebook error returned the same error for an invalid login.
I'm going to handle this by letting my user manually navigate trough the different types of solutions.
See the "Handling Errors" section of this page for strategies on how to notify users of different types of errors: https://developers.facebook.com/docs/graph-api/using-graph-api/#errors

Resources