Keycloak - Where are the authServerUrl and authUrl stored? - keycloak

I have set up Keycloak locally successfully (localhost). However, since I was using ngrok I changed authServerUrl and authUrl in the Admin console (realm settings) to the ngrok URL. The ngrok URL has now changed and I cannot access the Keycloak admin console because it's trying the open the old ngrok URL for the Admin page.
Is there a folder, xml or json file where I can adjust the authServerUrl and authUrl for Keycloak locally?

I was able to edit/correct the authServerUrl and authUrl via CLI. The property is called frontendUrl in the realm JSON file.
In case anyone comes across the same here is the command:
./kcadm.sh update realms/master -s attributes.frontendUrl=http://localhost:8080/auth

Related

Supabase self hosted OAuth Redirect

I am trying to run a self hosted instance of supabase with an oauth connection to keycloak.
When i test the login my url becomes
http://localhost:3004/?error=server_error&error_description=Unable+to+exchange+external+code%3A+2e9950ce-e003-40e4-9c78-27a9a92c45dd.52212bf2-f8b9-4a9e-ac7d-9805b0d79ba6.d8862f10-3dc5-4670-b97e-fd6bccd0b307
My Keycloak client redirect url
http://localhost:8000/auth/v1/callback
I also added the following code to my docker compose file
GOTRUE_EXTERNAL_KEYCLOAK_ENABLED: true
GOTRUE_EXTERNAL_KEYCLOAK_CLIENT_ID: supabase
GOTRUE_EXTERNAL_KEYCLOAK_SECRET: <Secret>
GOTRUE_EXTERNAL_KEYCLOAK_REDIRECT_URI: http://localhost:8000/auth/v1/callback
GOTRUE_EXTERNAL_KEYCLOAK_URL: http://172.20.150.149:8181/realms/Dev
I am using NextJS to create the app.

Keycloak Client settings, what URLs do I need?

I have problems setting up Keycloak for a project I do.
Keycloak is running on http://localhost:8180.
Thorntail server is running on http://localhost:8080/users which serves data for an
Angular frontend on http://localhost:4200/*. What I want to do is that a User can only see http://localhost:4200/sign-in without logging in. Once logged in they can access for example http://localhost:4200/list-user.
I was using this guide to set up Keycloak, but I'm not sure what I my Client settings should be. This is what I thought:
Root URL: http://localhost:4200/sign-in
*Valid Redirect URIs: http://localhost:4200/list-user
Base URL: http://localhost:4200/sign-in
Admin URL: http://localhost:8080
Somebody please explain the purpose of these settings as I struggle to understand.
Root url is just a value that will be used for relative paths resolving.
Root: http://localhost:4200/sign-in
Valid Redirects: /* (After login user could be redirected to any URI that matches pattern http://localhost:4200/sign-in/*)
Base URL: / (Is not mandatory. Used when keycloak need to calculate application url by client_id only)
Admin URL: / (Used when Keycloak need to notify applications about revocation or when user logs out. For example when user logs out in application A if he has session in application B, Keycloak will send backchannel request to Admin URL of application B, so Application B will also flush user session in it)
Check out docs and info badges in Admin Console

Cannot find Openshift 3 login details for Eclipse with JBoss tools

Openshift gives a login command for oc upon clicking copy login command but Eclipse asks for a server url and a token.
I tried putting server url and token from the copied command but it shows login error.
It shows "The server type, credentials, or auth scheme might be incorrect."
Openshift login
Where can I find these details for login?
Please help me login to openshift using eclipse.
if you look at what "Copy Login Command" in the Web-UI for OpenShift gives you you'll see something similar to this:
oc login https://192.168.64.39:8443 --token=XXXXXXXXXXXXXXXXXXXXXXXX
There are all informations that you need to connect via Eclipse. You have the server url https://192.168.64.39:8443 and the token that you can give Eclipse when switching the authentication to OAuth.

Can't login to openshift from eclipse

I have created OpenShift account, and I can login to OpenShift web console from browser, but I can't connect from eclipse. Server type is set to OpenShift 2 and "use default server" is checked. I entered the email address for username and password, the same stuff I use for logging in on OpenShift Web Console.
When I try to login I get :
Your credentials are not authorized to access "https://openshift.redhat.com/broker/rest/user"
The problem you're running into is that you're actually using OpenShift Online 3. You can find a blog post about using eclipse with OpenShift Online 3 here. The only difference being that you need to replace the console url with the correct url from your cluster.
Your cluster's console URL will look like https://console.<cluster-name>.openshift.com.

Meteor + accounts-facebook redirecting to wrong url

I'm currently developing on my server, not on my personal computer, but it seems to be impossible to tell it to Meteor, as I'm trying to use Facebook login. The expected login url for app.example.com is
https://www.facebook.com/dialog/oauth?client_id=<client id>&redirect_uri=http://app.example.com/_oauth/facebook?close&<more junk>
But I always get
https://www.facebook.com/dialog/oauth?client_id=<client id>&redirect_uri=http://localhost:3000/_oauth/facebook?close&<more junk>
I'm using Nginx as a proxy for Meteor server, so I should be able to access it pointing to app.example.com, but Meteor seems to not detect it. Where is it changeable?
You should set the environment value ROOT_URL before executing meteor, i.e.
ROOT_URL=http://app.example.com meteor run