OAuth - Error handling auth response. Error: invalid_grant - AWS Amplify authentication - reactjs

I am getting this error:
OAuth - Error handling auth response. Error: invalid_grant,
because the user is disabled so I can't log in, but I am wondering how can I receive the information if the user is disabled based on typing email? Cause right now when I'm trying to console.log the enabled status, I am getting undefined because the user didn't sign in.

Related

Connect react native with my dialogflow account

I am creating this application currently following this tutorial
When I send a message in the chatbot, the onSend function works, however, I get an error with my chatbot's response and I am given this error in the console.
Received response:
{
"error":{
"code":401,
"message":"Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie, or another valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
"status":"UNAUTHENTICATED"
}
}
Can anyone help?
I have tried to see if my Google cloud APIs and services status is active and checked if my credentials have been revoked in IAM & Admin, still, the same error is returned in my console

How to solve this LinkedIn API errorĀ "Not enough permissions to access: GET /me",

I am using this url "https://api.linkedin.com/v2/me?projection=(id,firstName,lastName,profilePicture(displayImage~:playableStreams))" for getting the user name and user image, but I am getting an error response.
This is the response I'm getting:
I am using React Linked In Login Using OAuth 2.0 package.

MERN Stack with Auth0: Calling API resource from react app gives 401 Unauthorized error

My MERN stack app works like this:
User logs in with google account (Auth0)
User fills up a form and clicks submit. Post request is sent to API with Bearer token and data
ExpressJs API on the backend validates JWT. If it is valid, the data gets saved in database
Here, I'm able to login using google. However when I fill up the form and click submit, I'm getting unauthorized error with a status code of 401. The exact error I'm seeing is ,
"InvalidTokenError: Invalid URL
at D:\Projects\2022\MV\mvjuly\node_modules\express-oauth2-jwt-bearer\dist\index.js:271:19
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async D:\Projects\2022\MV\mvjuly\node_modules\express-oauth2-jwt-bearer\dist\index.js:354:24"
What could be the reason? Thanks in advance!

RTK Query - don't log browser errors to the console

I have used RTK query in my web site. There is one URL endpoint that needs authentication. If the user is not signed int, the HTTP status code is 401 Unauthorized. And hence, GET https://example.com/ 401 is logged to the console.
Chrome lighthouse complains that Browser errors were logged to the console.
How to ignore logging error to the console when App is in production mode?

Ho do i redirect to login page if error occured while renewing aad token?

i'm using react-adal to authenticate react-typescript app . Everything works fine after login but if i keep logged in and if tried to access site after let's say one hour i'm getting
AADSTS50058: A silent sign-in request was sent but no user is signed in.
Is there any way to redirect user to login page if token renewal is failed or renew token before getting expired. If you have any other solution please suggest.

Resources