Skip to content

Commit f061a83

Browse files
authored
[Auth] Use constants for 'supportsSecureCoding' implementation (firebase#13988)
1 parent a0ad239 commit f061a83

17 files changed

+17
-33
lines changed

FirebaseAuth/Sources/Swift/Auth/AuthDataResult.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ extension AuthDataResult: NSSecureCoding {}
5454
private let kUserCodingKey = "user"
5555
private let kCredentialCodingKey = "credential"
5656

57-
public static var supportsSecureCoding = true
57+
public static let supportsSecureCoding = true
5858

5959
public func encode(with coder: NSCoder) {
6060
coder.encode(user, forKey: kUserCodingKey)

FirebaseAuth/Sources/Swift/Auth/AuthTokenResult.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,7 @@ extension AuthTokenResult: NSSecureCoding {}
129129

130130
private static let kTokenKey = "token"
131131

132-
public static var supportsSecureCoding: Bool {
133-
return true
134-
}
132+
public static let supportsSecureCoding = true
135133

136134
public func encode(with coder: NSCoder) {
137135
coder.encode(token, forKey: AuthTokenResult.kTokenKey)

FirebaseAuth/Sources/Swift/AuthProvider/EmailAuthProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ import Foundation
6262

6363
// MARK: Secure Coding
6464

65-
static var supportsSecureCoding = true
65+
static let supportsSecureCoding = true
6666

6767
func encode(with coder: NSCoder) {
6868
coder.encode(email, forKey: "email")

FirebaseAuth/Sources/Swift/AuthProvider/FacebookAuthProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import Foundation
4848

4949
// MARK: Secure Coding
5050

51-
static var supportsSecureCoding = true
51+
static let supportsSecureCoding = true
5252

5353
func encode(with coder: NSCoder) {
5454
coder.encode(accessToken, forKey: "accessToken")

FirebaseAuth/Sources/Swift/AuthProvider/GameCenterAuthProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163

164164
// MARK: Secure Coding
165165

166-
static var supportsSecureCoding = true
166+
static let supportsSecureCoding = true
167167

168168
func encode(with coder: NSCoder) {
169169
coder.encode(playerID, forKey: "playerID")

FirebaseAuth/Sources/Swift/AuthProvider/GitHubAuthProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import Foundation
4848

4949
// MARK: Secure Coding
5050

51-
public static var supportsSecureCoding = true
51+
public static let supportsSecureCoding = true
5252

5353
func encode(with coder: NSCoder) {
5454
coder.encode(token, forKey: "token")

FirebaseAuth/Sources/Swift/AuthProvider/GoogleAuthProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ import Foundation
5353

5454
// MARK: Secure Coding
5555

56-
static var supportsSecureCoding = true
56+
static let supportsSecureCoding = true
5757

5858
func encode(with coder: NSCoder) {
5959
coder.encode(idToken, forKey: "idToken")

FirebaseAuth/Sources/Swift/AuthProvider/OAuthCredential.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ import Foundation
9696

9797
// MARK: Secure Coding
9898

99-
public static var supportsSecureCoding: Bool = true
99+
public static let supportsSecureCoding: Bool = true
100100

101101
public func encode(with coder: NSCoder) {
102102
coder.encode(idToken, forKey: "IDToken")

FirebaseAuth/Sources/Swift/AuthProvider/PhoneAuthCredential.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import Foundation
3939

4040
// MARK: Secure Coding
4141

42-
public static var supportsSecureCoding = true
42+
public static let supportsSecureCoding = true
4343

4444
public func encode(with coder: NSCoder) {
4545
switch credentialKind {

FirebaseAuth/Sources/Swift/AuthProvider/TwitterAuthProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import Foundation
5252

5353
// MARK: Secure Coding
5454

55-
static var supportsSecureCoding = true
55+
static let supportsSecureCoding = true
5656

5757
func encode(with coder: NSCoder) {
5858
coder.encode(token, forKey: "token")

0 commit comments

Comments
 (0)