# OpenID Plugin not working for response\_type token - only id\_token works well

**URL:** https://community.weweb.io/t/openid-plugin-not-working-for-response-type-token-only-id-token-works-well/16578
**Category:** How do I?
**Tags:** authentication
**Created:** [February 17, 2025, 9:49am UTC](https://community.weweb.io/t/openid-plugin-not-working-for-response-type-token-only-id-token-works-well/16578 "2025-02-17T09:49:57Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![andre.weigelt](https://avatars.discourse-cdn.com/v4/letter/a/6a8cbe/32.png) [@andre.weigelt](https://community.weweb.io/u/andre.weigelt)
#### Post date: [February 17, 2025, 9:49am UTC](https://community.weweb.io/t/openid-plugin-not-working-for-response-type-token-only-id-token-works-well/16578/1 "2025-02-17T09:49:57Z")

</div>

Hello community,

I’ve been looking into weweb auth plugin for a couple of days and struggle to set it up properly to get user context and access token.

My OpenID Auth provider is ‘keycloak’. The client works well on different application so far including postman collection to retrieve access\_token (via token endpoint).

Now, I followed [[OpenID | WeWeb Documentation](https://docs.weweb.io/plugins/auth-systems/open-id.html)]([https://the](https://the) open-id docs) to connect to my client in keycloak.

The login and fetch user details works well only if response\_type is `id_token` only. If I change to `id_token token` or`token` only, I don’t get the user context nor `isAuthenticated`.

 ![Screenshot 2025-02-17 at 10.41.15](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/5/5798c6c0558372915824bacb85140954bb71e3f7.png)

Do you have any advice how to get the acces\_token properly? It’s a little bit hard to debug.

---

<div class="post-metadata">

### Author: ![amulin](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@amulin](https://community.weweb.io/u/amulin)
#### Post date: [April 5, 2025, 4:37pm UTC](https://community.weweb.io/t/openid-plugin-not-working-for-response-type-token-only-id-token-works-well/16578/2 "2025-04-05T16:37:21Z")

</div>

I’m struggling with a similar issue.

If I’m using the Authorization Code Flow + PKCE protocol by setting response\_type `code` in the plugin, it will exchange the code for an id\_token and access\_token, but it seems impossible to extract them from the plugin.

Instead, the plugin attempts to read userinfo from the `/openid/userinfo` that it retrieves from well-known configuration endpoint, which is apparently not supposed to be called by browsers, and hence crashes with 400 due to CORS.
