Why does Auth0 fails with error unknown client? - node.js

I have a React project using express/node.js on the backend. Tested the project thoroughly before deploying, fully functional with no problems. After hosting and configuration, the site is accessible online but any login attempt generates a 400 error stating the request is coming from an unknown client?
I can share any code snippets needed but I'm thinking something is wrong in my Auth0 configuration. I've checked and triple-checked the clientID and key in my code, as well as my web origin urls and allowed callback URLs.
Can't find any reference to this error code here on stack or on google. Auth0 support has no mention.
Has anyone had this problem?

Related

YouTube Data API v3 OAuth setup from Python

I am using Python to directly run a script of automatically replying user's comments.
I have a client secrets file after applying for a web-application. However, when I run for credentials, it first asks me to Please visit this URL to authorize this application and then when I clicked on it, it gives me this error:
Error 400: redirect_uri_mismatch The redirect URI in the request, urn:ietf:wg:oauth:2.0:oob, can only be used by a Client ID for native application. It is not allowed for the WEB client type. You can create a Client ID for native application at.
What application should I have applied for the OAuth in this case.
I know that this issue could be related to redirect URL. But because I am running this out of my script on my local computer, I am wondering what my URL should be.
You have to acknowledge that your issue above is precisely due to the redirect URI mismatch. The error response you got from the API is indicating you this.
To fix you issue, you'll have to have the same redirect URI set on your project within Google developers console and, at the same time, within your Python script.
If you indeed are running your application on your desktop (laptop) computer, then follow on the error message advice: within Google developers console, do set your project type to be of Desktop kind.

ERR_CONNECTION_REFUSED and Failed to fetch (nodejs, graphql, apollo)

I am newbie on JS frameworks, so sorry if my question is easy but I didn't find any solution on my Google friend :)
I am creating a web app with ReactJS in Front-End, NodeJS in Back-End, GraphQL and Apollo.
I have my Back-End that works on localhost:4001/api (I am viewing the GraphQL interface with a query).
I have my Front-End that's working when I am not connected to my server. But when I am connected it, I have two errors (I think they are linked).
I have in my console :
Bug
I resolved the cors error but here, I am blocked. I tried bearer-authentication, but I'm not sure how can I use it and I'm not sure it's the a problem, but bearer solved this two bugs, but created the bug "Network error: Response not successful: Received status code 400" (is it permission?)
You can view my github repo here : https://github.com/tiffanyLestroubac/ReactJs-NodeJs-GraphQl-App
Thanks in advance :)

The `ApplicationCredential` instance is not valid. Details: `provider` can't be blank

I am trying to get Facebook login working with loopback using their loopback-component-passport plugin.
I have configured app details in providers.json and now if I visit http://localhost:3000/auth/facebook I am redirected to facebook and can successfully login. However, when I get redirected back (to /auth/facebook/callback) I get the following error --
ValidationError
422 The 'ApplicationCredential' instance is not valid. Details:providercan't be blank (value: undefined).
I can't make sense of this error because the providers file is where the fb app and paths etc are configured and they are definitely working.
The plugin is poorly documented so I am out of ideas at this point.
I have figured out the cause for this error. I had initiated my loopback project as a blank project. However for loopback-component-passport to work it requires User, AccessToken, ACL models to be available. These are inbuilt in loopback and can be manually added to model-config.json. Or, you can initialize the project with user authentication and it should work.
This was one of many roadblocks that I ran into due to my lack of knowledge in the area and Loopback's poor documentation for the plugin. The Tutorial section in the docs and the example github project it links to are completely out of date.

Retrieve BLOGS_UPLOADED_IMAGES in java

I have some java code that retrieves blogs through the REST API's. I am not using the social business toolkit, but we have our own framework for that.
The application works perfectly on an on-premise connections environment and has worked on multiple versions.
However when switching to Connections Cloud, some parts stopped worked.
We get a 403 - Forbidden exception on 2 occasions:
Getting the details of a blog post: /blogs/[blog-id]/feed/entry/atom?entryid=[entry-id]
Getting images inside the blog post: /blogs/[blog-id]/resource/BLOGS_UPLOADED_IMAGES/[image file name]
I have fixed issue 1) by switching to the plublishing API: /blogs/[blog-id]/api/entries/[entry-id].
I cannot find a way to fix issue 2). I have also found 2 other image urls:
https://apps.ce.collabserv.com/blogs/[blog-id]/api/media/[file-name]
https://apps.ce.collabserv.com/blogs/[blog-id]/api/media/BLOGS_UPLOADED_IMAGES/[file-name].media
Both return:
<sp_0:error xmlns="http://incubator.apache.org/abdera" xmlns:sp_0="http://incubator.apache.org/abdera">
<code>404</code>
<message>Not Found</message>
</sp_0:error>
I want to authenticate by using Basic Authentication when possible. This does not appear to work with the given 403 urls.
My guess is that this the basic authentication header is not picked up. I have seen this before.
I used to fix this by first calling another URL that does support basic authentication and using the Ltpa cookies to authenticate the image url.
This also does not work: I do get LtpaTokens, but when I pass all the cookies to the URL, the image still does not work.
I prefer not to use OAuth of OAuth 2 at this moment. Is there any other way to fix this?
Anybody else managed to retrieve BLOGS_UPLOADED_IMAGES?
The issue is can also be reproduced in a browser.
Make sure you are not yet authenticated and the blog has posts with
images
Go to /blogs/[blog-id]/api/media
Authenticate using the popup in the browser The Atom feed now appears. This contains the images of your blog.
403 when opening:
/blogs/[blog-id]/resource/BLOGS_UPLOADED_IMAGES/[image]
404 xml when opening: /blogs/[blog-id]/api/media/* links

Getting AccessTokenFailed using ServiceStack FacebookAuthProvider

trying to use facebook's oauth with servicestack, i'm hitting url
localhost:60782/api/auth/facebook
being taken to facebook's auth dialog but after clicking allow, i'm being redirected back to my redirect URL with #f=AccessTokenFailed
localhost:60782/api/users#f=AccessTokenFailed
anyone have any idea what's going on here?
I had a similar problem when setting the facebook authentication up. I found it difficult to pinpoint the problem because servicestack catches the web exception and effectively discards it. To work out what was happening I downloaded and compiled the service stack code. I was then able to change my project to reference my local service interace DLL which enabled me to set a debug point in the facebook auth provider.
In my case I was getting a proxy authentication error, caused by the server attempting to contact facebook without any credentials. I overcame this by reconfiguring my dev pc and production pc so that they didnt go via the proxy.

Resources