@capgo/capacitor-social-login 8.5.6 → 8.5.8

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.5.6";
27
+ private final String pluginVersion = "8.5.8";
28
28
 
29
29
  public static String LOG_TAG = "CapgoSocialLogin";
30
30
  public HashMap<String, SocialProvider> socialProviderHashMap = new HashMap<>();
@@ -385,6 +385,7 @@ class OAuth2Provider: NSObject {
385
385
  }
386
386
 
387
387
  func logout(providerId: String, completion: @escaping (Result<Void, Error>) -> Void) {
388
+ let storedIdToken = loadTokens(for: providerId)?.idToken
388
389
  UserDefaults.standard.removeObject(forKey: tokenStorageKey(for: providerId))
389
390
  ensureDiscovered(providerId: providerId) { [weak self] res in
390
391
  guard let self = self else {
@@ -395,7 +396,7 @@ class OAuth2Provider: NSObject {
395
396
  var url = base
396
397
  if var components = URLComponents(url: base, resolvingAgainstBaseURL: false) {
397
398
  var items = components.queryItems ?? []
398
- if let idToken = self.loadTokens(for: providerId)?.idToken, !idToken.isEmpty {
399
+ if let idToken = storedIdToken, !idToken.isEmpty {
399
400
  items.append(URLQueryItem(name: "id_token_hint", value: idToken))
400
401
  }
401
402
  if let post = config.postLogoutRedirectUrl, !post.isEmpty {
@@ -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.5.6"
19
+ private let pluginVersion: String = "8.5.8"
20
20
  public let identifier = "SocialLoginPlugin"
21
21
  public let jsName = "SocialLogin"
22
22
  private static let userCancelledCode = "USER_CANCELLED"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-social-login",
3
- "version": "8.5.6",
3
+ "version": "8.5.8",
4
4
  "description": "All social logins in one plugin",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",