Skip to content
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

Remove parameters from Authentication API client methods [SDK-2902] #530

Merged
merged 5 commits into from
Nov 4, 2021

Conversation

Widcket
Copy link
Contributor

@Widcket Widcket commented Nov 2, 2021

Changes

⚠️ THIS PR CONTAINS BREAKING CHANGES

The following Authentication API Client methods lost the parameters parameter:

  • login(phoneNumber:code:audience:scope:)
  • login(usernameOrEmail:password:realm:audience:scope:)
  • loginDefaultDirectory(withUsername:password:audience:scope:)
  • tokenExchange()

That parameter was no longer necessary since Request has a parameters() method that can be used to pass custom parameters to any Authentication API Client method.

Testing

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

Checklist

@Widcket Widcket requested a review from a team as a code owner November 2, 2021 22:55
@Widcket Widcket marked this pull request as draft November 3, 2021 12:55
@Widcket Widcket marked this pull request as ready for review November 3, 2021 12:57
@Widcket Widcket marked this pull request as draft November 3, 2021 12:57
@Widcket Widcket added the review:small Small review label Nov 3, 2021
@Widcket Widcket changed the title Remove parameters param from Auth API client methods [SDK-2902] Remove parameters param from Authentication API client methods [SDK-2902] Nov 3, 2021
@Widcket Widcket changed the title Remove parameters param from Authentication API client methods [SDK-2902] Remove parameters from Authentication API client methods [SDK-2902] Nov 3, 2021
@@ -1278,8 +1264,6 @@ public extension Authentication {
.start { print($0) }
```

- precondition: if you are not using OAuth 2.0 API Authorization please use `delegation(parameters:)`
Copy link
Contributor Author

@Widcket Widcket Nov 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delegation(parameters:) is deprecated and will be removed in a future PR.

@@ -686,7 +678,7 @@ public protocol Authentication: Trackable, Loggable {

/**
Renew user's credentials with a refresh_token grant for `/oauth/token`
If you are not using OAuth 2.0 API Authorization please use `delegation(parameters:)`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delegation(parameters:) is deprecated and will be removed in a future PR.

@Widcket Widcket marked this pull request as ready for review November 3, 2021 18:22

```
Auth0
.authentication(clientId: clientId, domain: "samples.auth0.com")
.login(phoneNumber: "+4599134762367",
code: "123456",
audience: "https://myapi.com/api",
scope: "openid email",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a later PR, but make sure you have instructions somewhere for adding custom params to /authorize

@Widcket Widcket merged commit b30c980 into beta Nov 4, 2021
@Widcket Widcket deleted the v2/remove-parameters branch November 4, 2021 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review:small Small review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants