casdoor / casdoor-js-sdk

Javascript client SDK for Casdoor
https://github.com/casdoor/casdoor
Apache License 2.0
30 stars 27 forks source link

getSigninUrl() is not taking the Grant Types into account #29

Closed KrishnaPG closed 1 year ago

KrishnaPG commented 2 years ago

The implementation of getSigninUrl() currently is hardcoded for Authorization Code Grant Type

https://github.com/casdoor/casdoor-js-sdk/blob/72d558769d5cfd7d97ea9d2b77c2027b4f0c2b54/src/sdk.ts#L58-L63

image

casbin-bot commented 2 years ago

@Steve0x2a @seriouszyx @Abingcbc @ComradeProgrammer

hsluoyz commented 2 years ago

Hi @KrishnaPG

It has to take grant type into account and construct the appropriate URL for all other relevant Grant Types too.

How to do this? Can you be more specific?

Also, there should be a way to retrieve the configured grant types from the CASDoor Server for a given application. (Or better yet, automatically build the URL from one of the configured grant types for the application by talking to the casdoor server)

You can use the GetApplication() API: https://door.casdoor.com/swagger/#/Application%20API/ApiController.GetApplication

hsluoyz commented 2 years ago

@Shivansh-yadav13 @leo220yuyaodog

hsluoyz commented 1 year ago

Closed as resolved