mauriciovigolo / keycloak-angular

Easy Keycloak setup for Angular applications.
MIT License
727 stars 279 forks source link

Use direct access grant #48

Closed HaHaHaHaHaHaHaaaaaa closed 6 years ago

HaHaHaHaHaHaHaaaaaa commented 6 years ago

i get token by direct access grant ,how to connect it with keycloak-angular,i am really confused

mauriciovigolo commented 6 years ago

Hi,

Currently neither keycloak-angular and keycloak-js, implement this feature since its limitations.

Are you using this flow for a web or mobile app with nativescript (for example)?

HaHaHaHaHaHaHaaaaaa commented 6 years ago

@mauriciovigolo Em,I want to use this flow for a web to manage privilege and use myself login page

mauriciovigolo commented 6 years ago

@HaHaHaHaHaHaHaaaaaa, unfortunately I can't develop this feature for you now, but I have an idea to create a login component for keycloak-angular to support direct access grant in the future.

The way to do it, is to create your login and services directly, consuming the Keycloak REST API. In your case, the keycloak-angular will not help you yet.

Thanks for reporting the issue.

HaHaHaHaHaHaHaaaaaa commented 6 years ago

@mauriciovigolo thanks a lot

mauriciovigolo commented 6 years ago

@HaHaHaHaHaHaHaaaaaa, I will close this issue, since it seems to be solved by now. In the future we can come back to this issue. Thanks!

jcharlytown commented 6 years ago

Hi @mauriciovigolo ,

is there any news regarding the support for direct access grant? I haven't seen anything in the docs.

Regards!

jmparraguez-haulmer commented 6 years ago

Hi, I'm using direct access grant in one of my web application, I have my own login and register page that's connected with an intermediate service which calls the Keycloak API REST (with the admin credentials), I have implemented the API for login and register in this service, and this service returns to the Angular web application the access_token and refresh_token that I set into angular-keycloak.

I can share more details if you are interested.

With this implementation, I have the problem the user is never logged into Keycloak so I cannot use ’check login iframe’ or move the user to other applications without force to the user to re-login.

mauriciovigolo commented 6 years ago

hello @jmparra, nice to hear you solution. I'm really interested in providing this functionality in keycloak-angular. We could talk more about it, maybe on slack.

@jcharlytown, sorry I didn't see your message. As this issue was closed I did not see it. We are working on the new docs and soon we will have more details about different flows.

Thanks!

xmlking commented 5 years ago

i have implicit and direct access together working in my sample (works with keyclock) https://github.com/xmlking/ngx-starter-kit

may be this lib can use some of those ticks .... i am looking for native direct access flow support in keycloak-angular so that I can switch to keycloak-angular

PavelGonzalez commented 5 years ago

Hi I'm developing a web SPA with Angular and keycloak-angular. I need Direct Access Grant to access to some resources. Is there an example how to enable Direct Access Grant in keycloak-angular? I'm newbie. Thanks in advanced.

blephy commented 3 years ago

Hi,

I'm using Direct Access with Cypress in order to test my app. The app use keycloack-angular but after successfull logged-in, as you know, there is no localStorage or Cookie information with this type of authentication. I'm looking for a way to create Cookies, to make keycloack-angular working with direct access.

Did you work on this issue since 2018 ?

Regards,

HaHaHaHaHaHaHaaaaaa commented 3 years ago

Hi,we are useing keycloak in server side now, add token to cookies.

------------------ 原始邮件 ------------------ 发件人: "mauriciovigolo/keycloak-angular" <notifications@github.com>; 发送时间: 2021年2月26日(星期五) 晚上7:08 收件人: "mauriciovigolo/keycloak-angular"<keycloak-angular@noreply.github.com>; 抄送: "王柏林"<651753175@qq.com>;"Mention"<mention@noreply.github.com>; 主题: Re: [mauriciovigolo/keycloak-angular] Use direct access grant (#48)

Hi,

I'm using Direct Access with Cypress in order to test my app. The app use keycloack-angular but after successfull logged-in, as you know, there is no localStorage or Cookie information with this type of authentication. I'm looking for a way to create Cookies, to make keycloack-angular working with direct access.

Did you work on this issue since 2018 ?

Regards,

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

blephy commented 3 years ago

Using Keycloack in server-side with direct access grant work without cookies. I can test my APIs with cypress because i have token. But i can't test my client App which include keycloack-angular, i need to make cookies.

How to make cookies with right hash and values only from a token !?

An other solution is to make my own service / component. But this seams to be less secure ... no ?