Keycloak Linking

I created Parse client App based on REST Guide. And I used Keycloak as auth. I used this doc to do the linking: I also used this doc to get authData:

But I get error on the server:

Unexpected token u in JSON at position 0

this is my body:

{ "authData": { "keycloak": { "access_token": "eyJhbGciOiJSUzI1NiIsInR5...", "id": "lake", "roles": [], "groups": [] } } }

Could anyone help? Please.
or is there any tutorial how to link Keycloak from SDK REST Client to Parse Server?

Could you share the code for this request which is firing the error?

I tried post the params using Talend API Tester.
This is the request screenshoot:

and this is the Parse Server config:

{ "databaseURI": "mongodb://admin:[email protected]/pserver?authSource=admin", "appId": "APP_ID", "masterKey": "MASTER_KEY", "readOnlyMasterKey": "READ_ONLY_MASTER_KEY", "restAPIKey": "REST_API_KEY", "javascriptKey": "JAVASCRIPT_KEY", "serverURL": "http://localhost:1337/parse", "publicServerURL": "http://localhost:1337/parse", "mountGraphQL": true, "mountPlayground": true, "auth": { "keycloak": { "config": { "realm": "laker", "auth-server-url": "http://localhost:8080/auth/", "ssl-required": "none", "resource": "lake", "public-client": true, "confidential-port": 0 } } } }

Where do you see the error?

In parse-server log (terminal)

It looks the error is coming from this line: parse-server/keycloak.js at master · parse-community/parse-server · GitHub

Maybe we should log the string in the case it cannot be parsed. Anyways, it looks you are getting some error when trying to authenticate to Keycloak server (which will be hard to debug because of this json parse problem I mentioned before).

Is this address right? “auth-server-url”: “http://localhost:8080/auth/

Maybe you can try to perform this api call and see the error:parse-server/keycloak.js at master · parse-community/parse-server · GitHub

Yes the address is correct.
I am not sure to perform.
But thank you for your information.

After trying to solve:
The problem is: while request to keycloak server. I should use get option format manually like this:

{ host: "", port: 80, method: 'GET', path: "/auth/realms/myrealm/protocol/openid-connect/userinfo", headers: { Authorization: 'Bearer eyJ...' } }

is there any method to do that without manually?
Could any one help?

In order to achieve that, I believe you should set your Parse Server config with auth-server-url to and realm to myrealm.