Code Monkey home page Code Monkey logo

keycloak-nodejs-example's People

Contributors

dependabot[bot] avatar sreemanth avatar v-ladynev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

keycloak-nodejs-example's Issues

Custom Login

I have upload the shared json file to the Keycloak server for the CAMPAIGN_REALM and

I am able to login to the server with the NOrmal login with which redirects to the Keycloak Login Page.

I have problem while to login to the server with Custom Login for the username: admin_user and passwiord: admin_user.

The below error i am getting at the server side.

http://localhost:8080/auth/realms/CAMPAIGN_REALM/protocol/openid-connect/certs
{ keys:
[ { kid: 'FBfZzrTszXORm6TnVB05RWnV6OpnZYb2aX8kJFr_ZpM',
kty: 'RSA',
alg: 'RS256',
use: 'sig',
n: 'yUO8jLzyWVbW906qQN7DcQmWqnSTstpjJ-VQivC_Yilk1EH-EMj79iOqdMlSaa_T2zO1bZKbjfKBaM28ICT9VzPBRSde0GKQlucxrKdLmESHSJYlHnaPw49YYCBehUvY07wmw2naETXRz-1LbG_iyANCnZkSID8JCL0roBWHhlL5u5WMAnApWLQO2JSl1UcYYr5Souqq0yBytt6HtTpDq4BakPMLq9au8FlniZ-4XAIVZGK6pXc7XZTBJEeU_fLio4IQGt3VpJVhI8RIekXeHrmN-W-DNi1J2n4NMSrY7DqoRvyDQcBkxVZnnhZkhTBiaGFZFqhTZVVqAth4yW8uow',
e: 'AQAB' } ] }
validate id token went wrong
(node:3640) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): TypeError: Cannot set property 'store' of undefined
::ffff:127.0.0.1 - - [04/Oct/2017:19:15:19 +0000] "GET /customLoginEnter?login=admin_user&password=admin_user HTTP/1.1" - - "http://localhost:3000/customLogin" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0"
admin_user
admin_user
validate id token went wrong
(node:3640) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 7): TypeError: Cannot set property 'store' of undefined

Please note that i have not configured the MYSQL data base.

Issue when try add new user

Hello for all,

After doing all configurations my example is working fine, but when I try add a new user the system shown this message on the bottom of the screen:

\n\n<title>404 Not Found</title>\n\n

Not Found

\n

The requested URL /auth/realms/master/protocol/openid-connect/token was not found on this server.

\n
\nApache/2.4.33 (Win64) PHP/7.2.4 Server at localhost Port 8080\n\n

I would like to know how can I do to fix this issue or if keycloak has some external API when I could create new users.

Regards

Paulo

Getting Access denied error post login

I have imported both json files to keycloak and updated keycloak.json file in app root folder.
I am able to access the application url but post login I am seeing Access denied error in app page.
In app logs I can see below error. can you please help me in resolving the issue.

Grant validation failed. Reason: failed to load public key to verify token
Error: Can't set headers after they are sent.
at validateHeader (_http_outgoing.js:491:11)
at ServerResponse.setHeader (_http_outgoing.js:498:3)

demo fails to start

sudo docker run --name keycloak_dev \
--link mysql:mysql \
-p 8080:8080 \
-e MYSQL_DATABASE=KEYCLOAK_DEV -e MYSQL_USERNAME=keycloak -e MYSQL_PASSWORD=keycloak \
-e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin \
ladynev/keycloak-mysql-realm-users

fails with

21:16:14,685 WARN  [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (ServerService Thread Pool -- 53) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: IJ031084: Unable to create connection
	at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createLocalManagedConnection(LocalManagedConnectionFactory.java:345)
	at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:352)

the mysql system is running

CONTAINER ID        IMAGE                    COMMAND                  CREATED             STATUS              PORTS                                                        NAMES
884c0f8ec741        mysql                    "docker-entrypoint.sā€¦"   10 minutes ago      Up 10 minutes       3306/tcp, 33060/tcp                                          mysql

I have no idea on what's wrong or how to even start fixing this ;)

Getting Access denied error after login

I am facing intermittent issue of getting access denied error after login once the existing session expires.
The error I see in the server logs is 'Could not obtain grant code: Error: 400:Bad Request'.

Steps to reproduce this issue:

  1. Login into the application
  2. Wait for the session to expire which is 30 mins in my application
  3. Once the session expires, refresh the application and it redirects back to the login page.
  4. Try to login again in to the application and sometimes its hows the access denied error.

Please make the appropriate changes to fix this issue or let me know if there is any way I can fix this issue at my end.

Replace access denied response

Is there a way to return a different response from the 403 Access denied?
I would want to return my own error object.

Return custom attributes to client?

@v-ladynev Thanks for this repo, its very appreciated.

I'm trying to return some custom attributes that I have created for each user to the client. It's unclear to me how to do this. Do you know how I can return this data?

REFRESH TOKEN

Hello,
Does your example support refresh token or do you know how can I implement this?
Thank you

Assign roles to Groups

Hey there. Seems you really know what you doing with Keycloak. Could you help me solve my problem? I want to Assign roles to Groups. Tried to do the way do Assing roles to a user, but changed API call. But it seems request doesn't exist.

I used this request I find in official documentation :
POST /{realm}/groups/{id}/role-mappings/realm
Added realmName ID of a group and in body I sand array of objects each contain a name of a role.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.