From 01806753dd46451a8215f5872d929ad6e50b1983 Mon Sep 17 00:00:00 2001 From: Vignesh Prabhu <89976945+Vignesh-codezyng@users.noreply.github.com> Date: Sat, 25 Feb 2023 18:56:17 +0530 Subject: [PATCH] Added Scopes for youtube upload (#1) --- Sources/OpenGoogleSignInSDK/Model/GoogleSignInScope.swift | 3 +++ Sources/OpenGoogleSignInSDK/OpenGoogleSignInSDK.swift | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/OpenGoogleSignInSDK/Model/GoogleSignInScope.swift b/Sources/OpenGoogleSignInSDK/Model/GoogleSignInScope.swift index 88be254..837e51c 100644 --- a/Sources/OpenGoogleSignInSDK/Model/GoogleSignInScope.swift +++ b/Sources/OpenGoogleSignInSDK/Model/GoogleSignInScope.swift @@ -3,4 +3,7 @@ public enum GoogleSignInScope: String { case email case openID = "openid" case profile + case youTube = "https://www.googleapis.com/auth/youtube" + case YouTubeForceSsl = "https://www.googleapis.com/auth/youtube.force-ssl" + case YoutubeReadonly = "https://www.googleapis.com/auth/youtube.readonly" } diff --git a/Sources/OpenGoogleSignInSDK/OpenGoogleSignInSDK.swift b/Sources/OpenGoogleSignInSDK/OpenGoogleSignInSDK.swift index 167e4f1..ccf686c 100644 --- a/Sources/OpenGoogleSignInSDK/OpenGoogleSignInSDK.swift +++ b/Sources/OpenGoogleSignInSDK/OpenGoogleSignInSDK.swift @@ -39,7 +39,7 @@ public final class OpenGoogleSignIn: NSObject { public static let shared: OpenGoogleSignIn = OpenGoogleSignIn() /// API scopes requested by the app - public var scopes: Set = [.email, .openID, .profile] + public var scopes: Set = [.email, .openID, .profile,.youTube,.YoutubeReadonly,.YouTubeForceSsl] /// View controller to present Google sign-in flow. /// Needs to be set for presenting to work correctly.