react-native-app-auth Handling authorization Issue - react-native

I am using react-native-app-auth getting this error while implementing the authorization.
2023-01-03 18:48:45.395 17596-17631/com.appName E/AppAuth: Network error when retrieving discovery document
java.io.FileNotFoundException: https://com.example.com/login/oauth/authorize/.well-known/openid-configuration
com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:255) com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:211)
com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:30)
My Authorization Url looks like-
https://YOUR_DOMAIN/authorize?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=https://YOUR_APP/callback&scope={scope}&audience={apiAudience}&state={state}
I have followed this (https://authguidance.com/android-setup/) below document to implement for android.

Related

401 redirect_uri_mismatch with .net core web application?

Authorization Error
Error 400: redirect_uri_mismatch
You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy.
If you're the app developer, register the redirect URI in the Google Cloud Console.
The redirect uri sit he URI where you are telling the authorization server to return authorization to. This uri must be registered in Google developer console for your project.
So redirect uri miss match means that your application is telling the authorization server to return the authorization code to a uri that you have not configured in Google developer console. The easiest solution is to take the uri its telling you is missing and simply add it.
This video will show you how to add it. Google OAuth2: How the fix redirect_uri_mismatch error.

data accessing from Rally

I am trying to access rally data with API key,username and password but getting "HTTP ERROR 401 Problem accessing Reason: Full authentication is required to access this resource Powered by Jetty" issue.
I am using Node Version 10.18,
Can anyone help me in this.

Invalid appsecret_proof provided in the API argument using stormpath

I am using stormpath to sign up user from facebook authentication token. I am following the exact steps mentioned on stormpath wiki page http://docs.stormpath.com/java/product-guide/#integrating-with-facebook but i keep on getting below error.
HTTP 400, Stormpath 7200 (http://docs.stormpath.com/errors/7200): Stormpath was not able to complete the request to Facebook: this can be caused by either a bad Facebook directory configuration, or the provided account credentials are not valid. Facebook error message: Invalid appsecret_proof provided in the API argument

Why is Google OAuth2 returning java.io.IOException?

Within the last few weeks a suite of our applications using Google's Oauth2 authentication system and the Apache Oltu library have stopped working.
All attempts to register or log in via Google meet with the same error:
Login/registration action failed: java.io.IOException: Attempted read from closed stream.
This was all working fine recently and we have made no code or application changes in the intervening time.
Has something changed at the Google end which is causing all these requests to fail?
I do no seem to have any logging or information available from my Google developer console.
Within my application the log entries indicate an attempt to authenticate which does not succeed.
The code which is now failing, which used to succeed is:
// obtain a AuthRequest message to be sent to the OpenID provider
OAuthClientRequest oauthRequest = OAuthClientRequest
.authorizationLocation(discovery.getAuthzEndpoint())
.setClientId(Oauth2Util.getClientId())
.setRedirectURI(responseURL)
.setResponseType(ResponseType.CODE.toString())
.setScope(GOOGLE_SCOPE)
.setState(state)
.buildQueryMessage();
response.sendRedirect(oauthRequest.getLocationUri());
which triggers an exception:
java.io.IOException: Attempted read from closed stream.
all advice gratefully received
Google retired OpenID 2.0 on 20th April. See http://googledevelopers.blogspot.co.uk/2015/03/reminder-to-migrate-to-oauth-20-or.html
ok, I think i have understood what's going on. It is related to the OpenID retirement, but somewhat obliquely
In my code:
OAuthClientRequest oauthRequest = OAuthClientRequest
.authorizationLocation(discovery.getAuthzEndpoint())
is using an internal 'discovery' module which is trying to source information in a way which has been deprecated as part of the turn off of OpenID
the preferred Oltu way appears to be
OAuthClientRequest oauthRequest = OAuthClientRequest
.authorizationProvider(OAuthProviderType.GOOGLE)
which works much better
rtm: https://cwiki.apache.org/confluence/display/OLTU/OAuth+2.0+Client+Quickstart

WSO2 API Manager API authentication failure

Can anyone tell me why WSo2 API Manager does not authenticate? I have set up two WSo2 API Manager 1.8.0 instances and created an api.it is working fine as prototyped api. after it save and publish and call the api with an access token
getting the following rsponce
<ams:fault xmlns:ams="http://wso2.org/apimanager/security">
<ams:code>900906</ams:code>
<ams:message>
No matching resource found in the API for the given request
</ams:message>
<ams:description>
Access failure for API: /api/stature, version: 1.0.0 with key: null
</ams:description>
</ams:fault>
and here is the wso2carbon.log:
TID[-1234] [AM] [2015-01-19 00:12:47,263] ERROR {org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler} -
API authentication failure org.wso2.carbon.apimgt.gateway.handlers.security.oauth.OAuthAuthenticator.authenticate(OAuthAuthenticator.java:212)
org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler.handleRequest(APIAuthenticationHandler.java:94)
org.apache.synapse.rest.API.process(API.java:284) org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:83)
org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:64)
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:220)
org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:83)
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:344)
org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:168)
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:745)
No matching resource found in the API for the given request
The above issue occurs, when your request URL is wrong and APIManager could not match that with existing published APIs.
If the published API configuration is not deployed properly in the gateway. You can check this, browsing to Gateway's synapse config folder/api folder.(inside/repository/deployment/server)
If the relevant API entries are missing at APIM DB.
Do you try with distributed setup? did you change DBs? Check above all 3 points, then you can figure out the issue quickly.