Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: Federated Connections Support #682

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 29, 2025
Merged

Conversation

kishore7snehil
Copy link
Contributor

Changes

  • Added support for Federated Login for Authentication and Management APIs.

    • Extended the [/oauth/token (https://oktawiki.atlassian.net/wiki/spaces/AFG1/pages/3178596704/RFC+Federated+Connections+Access+Tokens+-+EA) to support federated login.
    • Two new endpoints added to Users.py i.e.
      • Get a List of All Token Sets
      • Revoking a token set

References

Testing

  • This change adds test coverage

  • This change has been tested on the latest version of the platform/language or why not

Contributor Checklist

@kishore7snehil kishore7snehil requested a review from a team as a code owner March 29, 2025 03:01
@arpit-jn arpit-jn merged commit 59f9ace into master Mar 29, 2025
10 checks passed
@arpit-jn arpit-jn deleted the feature/access_token_for_conn branch March 29, 2025 04:40
@kishore7snehil kishore7snehil mentioned this pull request Apr 1, 2025
kishore7snehil added a commit that referenced this pull request Apr 1, 2025
**Added**
- feat: Federated Connections Support
[\#682](#682)
([kishore7snehil](https://github.com/kishore7snehil))
- Adding Support For CIBA with RAR
[\#679](#679)
([kishore7snehil](https://github.com/kishore7snehil))
nzetzl pushed a commit to nzetzl/auth0-python-nzetzl-fork that referenced this pull request Apr 2, 2025
**Added**
- feat: Federated Connections Support
[\auth0#682](auth0#682)
([kishore7snehil](https://github.com/kishore7snehil))
- Adding Support For CIBA with RAR
[\auth0#679](auth0#679)
([kishore7snehil](https://github.com/kishore7snehil))
@siacomuzzi
Copy link
Member

Regarding auth0/authentication/get_token.py -> access_token_for_connection

response = self.get_token.access_token_for_connection(
    subject_token_type="urn:ietf:params:oauth:token-type:refresh_token",
    subject_token=subject_token,
    requested_token_type="http://auth0.com/oauth/token-type/federated-connection-access-token",
    connection=connection,
)

What's the reason to make subject_token_type and requested_token_type args mandatory? IMO they should be optional with a default value, like we are doing with grant_type.

cc @kishore7snehil

Also, you are missing the login_hint argument.

As a reference, see nextjs-auth0 lib implementation: https://github.com/auth0/nextjs-auth0/blob/dbfd5021dd70657926be142980022bfb99993298/src/server/auth-client.ts#L1045-L1057

@kishore7snehil
Copy link
Contributor Author

kishore7snehil commented Apr 15, 2025

@siacomuzzi I believe those two fields are required for the endpoint to work properly and I have not assigned the default value as there may be a chance of subject_token_type and requested_token_type values to differ for different use cases in future.

Regarding login hint, this wasn't mentioned as a mandatory field at the time of implementation but if we are sure today then I can add this field and release a patch version.

@siacomuzzi
Copy link
Member

siacomuzzi commented Apr 15, 2025

I have not assigned the default value as there may be a chance of subject_token_type and requested_token_type values to differ for different use cases in future.

Oh ok, we are not following this approach in other SDKs where those fields have a default value assigned, that's why I'm asking

Regarding login_hint, it's not mandatory, but it's an optional field supported by this grant type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants