0

I have a small app with flask. I want to connect it to keycloak server using docker-compose

here is the main code:

keycloak = KeycloakOpenID(server_url='http://localhost:8080/auth/',
                        client_id='guess-app',
            realm_name='guess',
            client_secret_key='')

# Define views
@app.route('/')
def index():
    if keycloak.token:
        return redirect('/home')
    else:
        return (keycloak.auth_url())

@app.route('/logout')
def logout():
    keycloak.logout()
    return redirect('/')

# Handle redirect from Keycloak
@app.route('/callback')
def callback():
    keycloak.callback()
    return redirect('/home')

and here is the screenshot from the client page in keycloak:

screenshot

the connection didn't work and im not getting the login screen and I really don't understand why

skinda
  • 1
  • 3

0 Answers0