It's strongly recommended to use our keycloak.js adapter. It doesn't use
cookies to maintain state. See our examples for it in the example
distribution.
If you handle things manually, you need to care about various things
(like refreshes etc) and for logout, you of course need to care of
manually removing all the OAuth related state from your application and
possibly remove cookies (if your application is using them).
Marek
On 22/09/16 02:01, Sean Schade wrote:
Do I need to use the Keycloak JS adapter in our Angular app in order
to get logout to work correctly? I thought we would be fine with just
the openid-connect logout url. It looks like the adapter clears the
token in the browser.
https://github.com/keycloak/keycloak/tree/master/adapters/oidc/js/src/mai...
On Wed, Sep 21, 2016 at 2:08 PM, Sean Schade
<sean.schade(a)drillinginfo.com <mailto:sean.schade@drillinginfo.com>>
wrote:
Thanks Scott for replying. We don't use an adapter. We have an
Angular app that makes HTTP calls to backend services. All of our
services are behind a Keycloak Security Proxy.
We are migrating away from Oracle OAM to Keycloak, and with Oracle
navigating to the logout link was sufficient. I assumed the same
would be for Keycloak.
I initially thought this might be the bug:
https://issues.jboss.org/browse/KEYCLOAK-3311
<
https://issues.jboss.org/browse/KEYCLOAK-3311>
However, after looking at the logs in Keycloak when I click the
Logout button in our app I see the following errors.
18:55:10,630WARN [org.jboss.resteasy.resteasy_jaxrs.i18n]
(defaulttask-11) RESTEASY002130: Failedto parse request.:
javax.ws.rs.core.UriBuilderException: RESTEASY003330: Failedto
create URI: null
1. Causedby: javax.ws.rs.core.UriBuilderException:
RESTEASY003280: empty host name
2. at
org.jboss.resteasy.specimpl.ResteasyUriBuilder.buildString(ResteasyUriBuilder.java:540)
3. at
org.jboss.resteasy.specimpl.ResteasyUriBuilder.buildFromValues(ResteasyUriBuilder.java:743)
Perhaps it is a combination of the Keycloak Security Proxy and
some misconfiguration? I'm not really sure at this moment.
Is my assumption correct that we do not need an adapter for oidc
logout?
On Wed, Sep 21, 2016 at 1:29 PM, Scott Rossillo
<srossillo(a)smartling.com <mailto:srossillo@smartling.com>> wrote:
Which adapter are you using?
Scott Rossillo
Smartling | Senior Software Engineer
srossillo(a)smartling.com <mailto:srossillo@smartling.com>
> On Sep 21, 2016, at 2:03 PM, Sean Schade
> <sean.schade(a)drillinginfo.com
> <mailto:sean.schade@drillinginfo.com>> wrote:
>
> We are having an issue where our browser application will
> initiate a logout, but after redirecting back to the
> application the user is not taken to the login screen. It
> appears the user is still logged in, and can fully access the
> application. I can see the session removed in Keycloak Admin
> UI. However, it appears the cookie never gets invalidated.
> Here is the redirect URL we use. Are we missing some
> configuration step in the client? I have standard flow,
> implicit flow, and direct access grants enabled. Valid
> redirect URIs, Base URL, and web origins are all configured
> in the client. Admin URL is not set as we are relying only on
> browser logout.
>
>
https://auth.dev.drillinginfo.com/auth/realms/dev/protocol/openid-connect...
>
<
https://auth.dev.drillinginfo.com/auth/realms/dev/protocol/openid-connect...
> _______________________________________________ keycloak-user
> mailing list keycloak-user(a)lists.jboss.org
> <mailto:keycloak-user@lists.jboss.org>
>
https://lists.jboss.org/mailman/listinfo/keycloak-user
> <
https://lists.jboss.org/mailman/listinfo/keycloak-user>
_______________________________________________
keycloak-user mailing list
keycloak-user(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user