Skip to content

Commit cd8126d

Browse files
committed
removed org for apple auth code and facebook login
1 parent 59ba125 commit cd8126d

File tree

3 files changed

+12
-25
lines changed

3 files changed

+12
-25
lines changed

Auth0/Auth0Authentication.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,7 @@ struct Auth0Authentication: Authentication {
166166
fullName: PersonNameComponents?,
167167
profile: [String: Any]?,
168168
audience: String?,
169-
scope: String,
170-
organization: String?) -> Request<Credentials, AuthenticationError> {
169+
scope: String) -> Request<Credentials, AuthenticationError> {
171170
var parameters: [String: Any] = [:]
172171
var profile: [String: Any] = profile ?? [:]
173172

@@ -187,15 +186,13 @@ struct Auth0Authentication: Authentication {
187186
subjectTokenType: "http://auth0.com/oauth/token-type/apple-authz-code",
188187
scope: scope,
189188
audience: audience,
190-
organization: organization,
191189
parameters: parameters)
192190
}
193191

194192
func login(facebookSessionAccessToken sessionAccessToken: String,
195193
profile: [String: Any],
196194
audience: String?,
197-
scope: String,
198-
organization: String?) -> Request<Credentials, AuthenticationError> {
195+
scope: String) -> Request<Credentials, AuthenticationError> {
199196
var parameters: [String: String] = [:]
200197
if let jsonData = try? JSONSerialization.data(withJSONObject: profile, options: []),
201198
let json = String(data: jsonData, encoding: .utf8) {
@@ -205,7 +202,6 @@ struct Auth0Authentication: Authentication {
205202
subjectTokenType: "http://auth0.com/oauth/token-type/facebook-info-session-access-token",
206203
scope: scope,
207204
audience: audience,
208-
organization: organization,
209205
parameters: parameters)
210206
}
211207

Auth0/Authentication.swift

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ public protocol Authentication: SenderConstraining, Trackable, Loggable {
335335
- profile: Additional user profile data returned with the Apple ID Credentials.
336336
- audience: API Identifier that your application is requesting access to.
337337
- scope: Space-separated list of requested scope values. Defaults to `openid profile email`.
338-
- organization: Identifier of an organization the user is a member of.
339338
- Returns: A request that will yield Auth0 user's credentials.
340339

341340
## See Also
@@ -346,8 +345,7 @@ public protocol Authentication: SenderConstraining, Trackable, Loggable {
346345
fullName: PersonNameComponents?,
347346
profile: [String: Any]?,
348347
audience: String?,
349-
scope: String,
350-
organization: String?) -> Request<Credentials, AuthenticationError>
348+
scope: String) -> Request<Credentials, AuthenticationError>
351349

352350
/**
353351
Logs a user in with their Facebook [session info access token](https://developers.facebook.com/docs/facebook-login/access-tokens/session-info-access-token/) and profile data.
@@ -396,8 +394,7 @@ public protocol Authentication: SenderConstraining, Trackable, Loggable {
396394
func login(facebookSessionAccessToken sessionAccessToken: String,
397395
profile: [String: Any],
398396
audience: String?,
399-
scope: String,
400-
organization: String?) -> Request<Credentials, AuthenticationError>
397+
scope: String) -> Request<Credentials, AuthenticationError>
401398

402399
/**
403400
Logs a user in using a username and password in the default directory.
@@ -1124,7 +1121,7 @@ public protocol Authentication: SenderConstraining, Trackable, Loggable {
11241121
}
11251122
```
11261123

1127-
You can also include additional parameters:
1124+
You can also include organization parameter:
11281125

11291126
```swift
11301127
Auth0
@@ -1133,7 +1130,7 @@ public protocol Authentication: SenderConstraining, Trackable, Loggable {
11331130
subjectTokenType: "urn:ietf:params:oauth:token-type:jwt",
11341131
audience: "https://example.com/api",
11351132
scope: "openid profile email",
1136-
additionalParameters: ["custom_claim": "value"])
1133+
organization: "org_id")
11371134
.start { print($0) }
11381135
```
11391136

@@ -1143,9 +1140,8 @@ public protocol Authentication: SenderConstraining, Trackable, Loggable {
11431140
- audience: API Identifier that your application is requesting access to. Defaults to `nil`.
11441141
- scope: Space-separated list of requested scope values. Defaults to `openid profile email`.
11451142
- organization: Identifier of an organization the user is a member of.
1146-
- additionalParameters: Additional parameters to include in the token exchange request. Defaults to empty dictionary.
11471143
- Returns: A request that will yield Auth0 user's credentials.
1148-
1144+
11491145
## See Also
11501146

11511147
- [Authentication API Endpoint](https://auth0.com/docs/api/authentication/token-exchange)
@@ -1157,7 +1153,6 @@ public protocol Authentication: SenderConstraining, Trackable, Loggable {
11571153
audience: String?,
11581154
scope: String,
11591155
organization: String?) -> Request<Credentials, AuthenticationError>
1160-
11611156
}
11621157

11631158
public extension Authentication {
@@ -1186,26 +1181,22 @@ public extension Authentication {
11861181
fullName: PersonNameComponents? = nil,
11871182
profile: [String: Any]? = nil,
11881183
audience: String? = nil,
1189-
scope: String = defaultScope,
1190-
organization: String? = nil) -> Request<Credentials, AuthenticationError> {
1184+
scope: String = defaultScope) -> Request<Credentials, AuthenticationError> {
11911185
return self.login(appleAuthorizationCode: authorizationCode,
11921186
fullName: fullName,
11931187
profile: profile,
11941188
audience: audience,
1195-
scope: scope,
1196-
organization: organization)
1189+
scope: scope)
11971190
}
11981191

11991192
func login(facebookSessionAccessToken sessionAccessToken: String,
12001193
profile: [String: Any],
12011194
audience: String? = nil,
1202-
scope: String = defaultScope,
1203-
organization: String? = nil) -> Request<Credentials, AuthenticationError> {
1195+
scope: String = defaultScope) -> Request<Credentials, AuthenticationError> {
12041196
return self.login(facebookSessionAccessToken: sessionAccessToken,
12051197
profile: profile,
12061198
audience: audience,
1207-
scope: scope,
1208-
organization: organization)
1199+
scope: scope)
12091200
}
12101201

12111202
func loginDefaultDirectory(withUsername username: String, password: String, audience: String? = nil, scope: String = defaultScope) -> Request<Credentials, AuthenticationError> {

Auth0/MyAccount/AuthenticationMethods/MyAccountAuthenticationMethods.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ public protocol MyAccountAuthenticationMethods: MyAccountClient {
217217
///
218218
/// - Returns: A request that will yield a totp enrollment challenge
219219
func enrollTOTP() -> Request<TOTPEnrollmentChallenge, MyAccountError>
220-
220+
221221
/// Enrolls a new ToTP authentication method. This is the last part of the enrollment flow.
222222
///
223223
/// ## Availability

0 commit comments

Comments
 (0)