Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent Google OAuth prompt on app launch #6380

Merged
merged 6 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
"react-native-branch": "5.3.1",
"react-native-change-icon": "4.0.0",
"react-native-circular-progress": "1.3.8",
"react-native-cloud-fs": "rainbow-me/react-native-cloud-fs#9b204615b76cf3d29bd86a9094dbd95d717b6a7a",
"react-native-cloud-fs": "rainbow-me/react-native-cloud-fs#247c245ff4da8de5bde47b627831798b49087868",
walmat marked this conversation as resolved.
Show resolved Hide resolved
"react-native-crypto": "2.2.0",
"react-native-dark-mode": "0.2.2",
"react-native-device-info": "5.3.1",
Expand Down
5 changes: 3 additions & 2 deletions src/handlers/cloudBackup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ export type GoogleDriveUserData = {
avatarUrl?: string;
};

export async function getGoogleAccountUserData(): Promise<GoogleDriveUserData | undefined> {
export async function getGoogleAccountUserData(checkPermissions = false): Promise<GoogleDriveUserData | undefined> {
if (!IS_ANDROID) {
return;
}
return RNCloudFs.getCurrentlySignedInUserData();
const options = { checkPermissions };
return RNCloudFs.getCurrentlySignedInUserData(options);
}

// This is used for dev purposes only!
Expand Down
2 changes: 1 addition & 1 deletion src/state/backups/backups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const backupsStore = createRainbowStore<BackupsStore>((set, get) => ({
}

if (IS_ANDROID) {
const gdata = await getGoogleAccountUserData();
const gdata = await getGoogleAccountUserData(true);
if (!gdata) {
logger.debug('[backupsStore]: Google account is not available');
set({ backupProvider: undefined, status: CloudBackupState.NotAvailable, backups: { files: [] }, mostRecentBackup: undefined });
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8882,7 +8882,7 @@ __metadata:
react-native-branch: "npm:5.3.1"
react-native-change-icon: "npm:4.0.0"
react-native-circular-progress: "npm:1.3.8"
react-native-cloud-fs: "rainbow-me/react-native-cloud-fs#9b204615b76cf3d29bd86a9094dbd95d717b6a7a"
react-native-cloud-fs: "rainbow-me/react-native-cloud-fs#247c245ff4da8de5bde47b627831798b49087868"
react-native-crypto: "npm:2.2.0"
react-native-dark-mode: "npm:0.2.2"
react-native-device-info: "npm:5.3.1"
Expand Down Expand Up @@ -22280,10 +22280,10 @@ __metadata:
languageName: node
linkType: hard

"react-native-cloud-fs@rainbow-me/react-native-cloud-fs#9b204615b76cf3d29bd86a9094dbd95d717b6a7a":
"react-native-cloud-fs@rainbow-me/react-native-cloud-fs#247c245ff4da8de5bde47b627831798b49087868":
version: 2.6.2
resolution: "react-native-cloud-fs@https://github.com/rainbow-me/react-native-cloud-fs.git#commit=9b204615b76cf3d29bd86a9094dbd95d717b6a7a"
checksum: 10c0/db1c719b90475201aa1e1177209723598ac38689a827d387dd281ea5190ad09f3e6c8fee77caff70b46a228b6552459d9a9e73e4159c18a29d19d235e17d7907
resolution: "react-native-cloud-fs@https://github.com/rainbow-me/react-native-cloud-fs.git#commit=247c245ff4da8de5bde47b627831798b49087868"
checksum: 10c0/0d78db6a3978bf9a0fe485d2dc0cf80fb1185a63eec1d22d7e3afd6c693417b011779d8318c603a9a81ff6c9c67f194dd469fc16a220ac0cd2b9b1ec374f1e2b
languageName: node
linkType: hard

Expand Down
Loading