Skip to content

Commit

Permalink
🎨 Fetch profile every time after authorization
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasackee committed Jul 8, 2021
1 parent 5b1f23e commit b1d25e0
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Sources/OpenGoogleSignInSDK/OpenGoogleSignInSDK.swift
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,7 @@ public final class OpenGoogleSignIn: NSObject {
case let .success(data):
do {
let user = try self.decodeUser(from: data)

if self.scopes.contains(.email) || self.scopes.contains(.profile) {
self.fetchProfile(user: user, completion: completion)
} else {
completion(.success(user))
}
self.fetchProfile(user: user, completion: completion)
} catch {
completion(.failure(.tokenDecodingError(error)))
}
Expand Down

0 comments on commit b1d25e0

Please sign in to comment.