@capgo/capacitor-social-login 8.3.5 → 8.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -24,7 +24,7 @@ import org.json.JSONObject;
|
|
|
24
24
|
@CapacitorPlugin(name = "SocialLogin")
|
|
25
25
|
public class SocialLoginPlugin extends Plugin {
|
|
26
26
|
|
|
27
|
-
private final String pluginVersion = "8.3.
|
|
27
|
+
private final String pluginVersion = "8.3.6";
|
|
28
28
|
|
|
29
29
|
public static String LOG_TAG = "CapgoSocialLogin";
|
|
30
30
|
public HashMap<String, SocialProvider> socialProviderHashMap = new HashMap<>();
|
|
@@ -113,14 +113,14 @@ class OAuth2Provider: NSObject {
|
|
|
113
113
|
responseType: config["responseType"] as? String ?? "code",
|
|
114
114
|
pkceEnabled: config["pkceEnabled"] as? Bool ?? true,
|
|
115
115
|
scope: normalizeScope(config["scope"] ?? config["scopes"]),
|
|
116
|
-
additionalParameters: config["additionalParameters"] as? [String:
|
|
116
|
+
additionalParameters: (config["additionalParameters"] as? [String: Any]).map { $0.mapValues { "\($0)" } },
|
|
117
117
|
loginHint: config["loginHint"] as? String,
|
|
118
118
|
prompt: config["prompt"] as? String,
|
|
119
|
-
additionalTokenParameters: config["additionalTokenParameters"] as? [String:
|
|
120
|
-
additionalResourceHeaders: config["additionalResourceHeaders"] as? [String:
|
|
119
|
+
additionalTokenParameters: (config["additionalTokenParameters"] as? [String: Any]).map { $0.mapValues { "\($0)" } },
|
|
120
|
+
additionalResourceHeaders: (config["additionalResourceHeaders"] as? [String: Any]).map { $0.mapValues { "\($0)" } },
|
|
121
121
|
logoutUrl: (config["logoutUrl"] as? String) ?? (config["endSessionEndpoint"] as? String),
|
|
122
122
|
postLogoutRedirectUrl: config["postLogoutRedirectUrl"] as? String,
|
|
123
|
-
additionalLogoutParameters: config["additionalLogoutParameters"] as? [String:
|
|
123
|
+
additionalLogoutParameters: (config["additionalLogoutParameters"] as? [String: Any]).map { $0.mapValues { "\($0)" } },
|
|
124
124
|
iosPrefersEphemeralWebBrowserSession:
|
|
125
125
|
(config["iosPrefersEphemeralWebBrowserSession"] as? Bool) ??
|
|
126
126
|
(config["iosPrefersEphemeralSession"] as? Bool) ??
|
|
@@ -228,7 +228,7 @@ class OAuth2Provider: NSObject {
|
|
|
228
228
|
let state = payload["state"] as? String ?? UUID().uuidString
|
|
229
229
|
let codeVerifier = payload["codeVerifier"] as? String ?? self.generateCodeVerifier()
|
|
230
230
|
let redirect = payload["redirectUrl"] as? String ?? config.redirectUrl
|
|
231
|
-
let additionalLoginParams = payload["additionalParameters"] as? [String:
|
|
231
|
+
let additionalLoginParams = (payload["additionalParameters"] as? [String: Any]).map { $0.mapValues { "\($0)" } }
|
|
232
232
|
|
|
233
233
|
self.currentState = state
|
|
234
234
|
self.currentCodeVerifier = codeVerifier
|
|
@@ -740,8 +740,10 @@ extension OAuth2Provider: ASWebAuthenticationPresentationContextProviding {
|
|
|
740
740
|
|
|
741
741
|
private extension Dictionary where Key == String, Value == String {
|
|
742
742
|
func percentEncoded() -> Data? {
|
|
743
|
-
|
|
744
|
-
|
|
743
|
+
var formValueAllowed = CharacterSet.urlQueryAllowed
|
|
744
|
+
formValueAllowed.remove(charactersIn: "+&=/")
|
|
745
|
+
return map { key, value in
|
|
746
|
+
"\(key.addingPercentEncoding(withAllowedCharacters: formValueAllowed) ?? key)=\(value.addingPercentEncoding(withAllowedCharacters: formValueAllowed) ?? value)"
|
|
745
747
|
}
|
|
746
748
|
.joined(separator: "&")
|
|
747
749
|
.data(using: .utf8)
|
|
@@ -16,7 +16,7 @@ import GoogleSignIn
|
|
|
16
16
|
*/
|
|
17
17
|
@objc(SocialLoginPlugin)
|
|
18
18
|
public class SocialLoginPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
19
|
-
private let pluginVersion: String = "8.3.
|
|
19
|
+
private let pluginVersion: String = "8.3.6"
|
|
20
20
|
public let identifier = "SocialLoginPlugin"
|
|
21
21
|
public let jsName = "SocialLogin"
|
|
22
22
|
public let pluginMethods: [CAPPluginMethod] = [
|