CIS2 Separate Authentication

I’m trying to test the separate authentication for CIS2. I followed the github tutorial to get started.

I have obtained the keycloak credentials. When I try to run with the provided info, I get invalid redirect_url as the redirect_url being passed is the localhost url (the same localhost url I entered into the redirect url field on the application set up page).

When I override the redirect url to https://google.com, this seems to work as it asks for a username. When entered, it takes me to a google error page.
options.Events.OnRedirectToIdentityProvider = context =>
{
context.ProtocolMessage.RedirectUri = “https://google.com”;
return Task.CompletedTask;
};

How can I get the redirect to take me back to my application with an access code?

Hi David, unfortunately, you will need to contact the API-M team who manage that side of the process via their help page. They will be able to create a client ID with your specific redirect URL, etc parameters. In the interim, you can manually copy the code from the google url and append to your own redirect url to test the flow - appreciate this isn’t practical longterm

Hi David, can you please let us know which KEYCLOAK_CLIENT and KEYCLOAK_AUTHORITY you are using? Also, hoping the application is running on http://localhost:5001.
Happy to jump on a call to troubleshoot this further. Kindly let me know your availability.

pytest-nhsd-apim

https://identity.ptl.api.platform.nhs.uk/realms/Cis2-mock-int

I will try and run it on port 5001. I think mine is on 7114.