You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When user is authenticated, its redirected back to app and it show this error [Error: Data intent is null]. I am currently using schemes.
When it comes back to app it shows nothing in console.log and this error comes which i mentioned above.
I found a solution to this issue after following the advice of #494 and #986 issues.
It seems like I failed to understand that the default scheme of the app is sort of an "endpoint" and that a new "endpoint" should be created for the authentication process.
Both "endpoints" will open the app but only one of them is expecting the auth data.
This meant that for a scheme com.myapp you should create a com.myapp.auth scheme by adding it to the build.grade:
Finally on Keycloak you would need to change Valid Redirect URI and Valid post logout redirect URIs to com.myapp.auth so that it points to the "endpoint" that expects the results instead of the main application.
Finally you shouldn't need to modify the default Android Manifest file since it already has it's default scheme set up. Adding anything here would result on a prompt making you choose between the different schemes within the app.
Issue
When user is authenticated, its redirected back to app and it show this error [Error: Data intent is null]. I am currently using schemes.
When it comes back to app it shows nothing in console.log and this error comes which i mentioned above.
App,js :
const config = {
issuer: 'http://domain.com/realms/NewWorld',
clientId: 'Check',
redirectUrl: 'com.myapp://*',
serviceConfiguration: {
authorizationEndpoint:
http://domain.com/realms/NewWorld/protocol/openid-connect/auth
,tokenEndpoint:
http://domain.com/realms/NewWorld/protocol/openid-connect/token
,},
scopes: ['openid', 'profile', 'email', 'offline_access'],
};
const App = () => {
const handleLogin = async () => {
try {
const authState = await authorize(config);
};
return (
Login with Keycloak
);
};
Android Manifest :
In build.gradle file :
my keycloak website configuration:
Environment
Android
react-native
Version:e.g. 0.73.5
react-native-app-auth
Version:e.g. 7.1.3
The text was updated successfully, but these errors were encountered: