I'm a noob in the world of React-Native development and am trying to work out how to configure FormidableLabs' react-native-app-auth plugin so that a user of our app can sign in to our Identity Server 4 implementation and then return to the app.
I can get to the sign-in form easily enough - but after signing in it goes to another Identity Server page in the browser rather than back to the app. I assume this is because of a wrong configuration, but I've searched the net far and wide for an answer that actually explains what the redirectUrl should actually point to - in all the examples it just points to io.identityserver.demo:/oauthredirect. Is it possible to redirect back to an app?
What I've also noticed is that the original request to the login page does not pass it a ReturnUrl - that parameter is null.
I feel I'm missing something obvious here, but I cannot think what it is.
Here's the relevant code from the app:
import {authorize} from 'react-native-app-auth';
...
const config = {
                    issuer: 'http://10.0.2.2:5000',
                    clientId: 'MyApp',
                    redirectUrl: '?? what goes here ??',
                    scopes: ['openid', 'profile', 'offline_access'],
                    serviceConfiguration: {
                        authorizationEndpoint: `http://10.0.2.2:5000/Account/Login`,
                        tokenEndpoint: `http://10.0.2.2:5000/connect/token`
                    }            
                }
                const result = await authorize(config);
The Identity Server is running on port 5000 (in localhost on my pc).
Can anyone point out what I'm doing wrong?
Thanks in advance!