Git Product home page Git Product logo

Comments (9)

andylockran avatar andylockran commented on June 12, 2024 3

Hey @manfredsteyer,

The issue is that the library seems hardcode the response type to 'token or 'token id_token' - whereas what I think @amouly and I required is the url to response_type=code.

It has to be like this to work with Strava for me, not sure what service @amouly was trying to auth against. I figured it's just an alias, rather than a different flow.

from angular-oauth2-oidc.

darbio avatar darbio commented on June 12, 2024 3

I have the same issue. I'm using Cognito to request the tokens which only accepts the response type of 'token' or 'code' [1].

By default this lib hard codes the type to 'id_token token' which is not correct. The response type for implicit is 'token', 'id_token' or 'id_token token' [2].

Regardless, it would be good to be able to override the response_type to cater for differences between ID providers. Currently, in order to work with Cognito, we have to set oidc: false which stops the parsing of identity token (which is returned by the IDP anyway).

https://github.com/darbio/angular-oauth2-oidc/blob/master/angular-oauth2-oidc/src/oauth-service.ts#L955-L957

[1] https://docs.aws.amazon.com/cognito/latest/developerguide/authorization-endpoint.html
[2] http://oauthlib.readthedocs.io/en/latest/oauth2/grants/implicit.html

from angular-oauth2-oidc.

manfredsteyer avatar manfredsteyer commented on June 12, 2024

code flow isn't supported by the library. The reason is that is is not indented for SPA. Please consider using implicit flow instead.

from angular-oauth2-oidc.

amouly avatar amouly commented on June 12, 2024

Apparently, ADFS does not support implicit flow (or simplified flow).

That's why I need the responseType to be code.

from angular-oauth2-oidc.

manfredsteyer avatar manfredsteyer commented on June 12, 2024

AFAIK it supports it meanwhile [1]. The Problem is that code flow isn't really suited for single page apps.

[1] https://docs.microsoft.com/en-us/windows-server/identity/ad-fs/development/single-page-application-with-ad-fs

from angular-oauth2-oidc.

rohit-nsit08 avatar rohit-nsit08 commented on June 12, 2024

@darbio +1 for the issue. So does that mean that I will have to process id token myself or not use this library at all for cognito? Thanks
@manfredsteyer any recommendation for workaround for using library with cognito?

from angular-oauth2-oidc.

nisha2107 avatar nisha2107 commented on June 12, 2024

Hi, was anyone able to solve this issue, as I am also facing the same issue while integrating ADFS with Angular 5.
Providing response_type = 'code'
Error: error=unsupported_response_type. The+authorization+server+does+not+support+obtaining+an+authorization+code+using+the+requested+'response_type'.+The+authorization+server+only+supports+'code'+as+the+response+type.

from angular-oauth2-oidc.

darbio avatar darbio commented on June 12, 2024

I think the author doesn’t want to include support for code flow (see: #52 (comment)). You can add in support as discussed above.

from angular-oauth2-oidc.

suresk79 avatar suresk79 commented on June 12, 2024

Hi, was anyone able to solve this issue, as I am also facing the same issue while integrating ADFS with Angular 5.
Providing response_type = 'code'
Error: error=unsupported_response_type. The+authorization+server+does+not+support+obtaining+an+authorization+code+using+the+requested+'response_type'.+The+authorization+server+only+supports+'code'+as+the+response+type.

Hi Nisha... were you able to resolve this issue later??

from angular-oauth2-oidc.

Related Issues (20)

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.