Skip to content

Commit

Permalink
Add Scope to prevent game save problems
Browse files Browse the repository at this point in the history
  • Loading branch information
DaVinci9196 committed Nov 11, 2024
1 parent fe6fe56 commit 5c7b613
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ class GamesServiceImpl(val context: Context, override val lifecycle: Lifecycle,
if (change != null && contents?.parcelFileDescriptor != null) {
runCatching {
val authResponse = withContext(Dispatchers.IO) {
AuthManager(context, account.name, packageName, SERVICE_GAMES_LITE).apply { isPermitted = true }.requestAuth(true)
AuthManager(context, account.name, packageName, "$SERVICE_GAMES_LITE ${Scopes.DRIVE_APPFOLDER}").apply { isPermitted = true }.requestAuth(true)
}
var oauthToken: String? = null
if (authResponse.auth?.let { oauthToken = it } == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.google.android.gms.R
import com.google.android.gms.common.Scopes
import com.google.android.gms.games.snapshot.SnapshotMetadataEntity
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialog
Expand Down Expand Up @@ -113,7 +114,7 @@ class GamesUiFragment(
}

val authResponse = withContext(Dispatchers.IO) {
AuthManager(context, currentAccount!!.name, clientPackageName, SERVICE_GAMES_LITE).apply { isPermitted = true }.requestAuth(true)
AuthManager(context, currentAccount!!.name, clientPackageName, "$SERVICE_GAMES_LITE ${Scopes.DRIVE_APPFOLDER}").apply { isPermitted = true }.requestAuth(true)
}
var oauthToken: String? = null
if (authResponse.auth?.let { oauthToken = it } == null) {
Expand Down

0 comments on commit 5c7b613

Please sign in to comment.