Skip to content

Commit

Permalink
fix: marke uri method to add custom scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
geeekgod committed Oct 7, 2022
1 parent f34242d commit edf310b
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
},
"versionCode": 1
"versionCode": 2
},
"web": {
"favicon": "./assets/favicon.png"
Expand Down
9 changes: 8 additions & 1 deletion app/screens/Login/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import * as WebBrowser from 'expo-web-browser';
import * as Google from 'expo-auth-session/providers/google';
import { StyleSheet, View } from 'react-native';
import { StyleSheet, View, Platform } from 'react-native';
import { heightScreen, widthScreen } from '../../utils/layout';
import { Box, Button, CloseIcon, HStack, Icon, IconButton, Text, VStack } from 'native-base';
import LoginUnlock from "../../assets/svg/login/LoginUnlock.svg";
Expand All @@ -10,6 +10,7 @@ import { Alert } from "native-base";
import bloodLineApi from '../../api';
import { AuthContext } from '../../context/AuthContext';
import { useNavigation } from '@react-navigation/native';
import { makeRedirectUri } from "expo-auth-session";


WebBrowser.maybeCompleteAuthSession();
Expand All @@ -23,6 +24,12 @@ const Login = () => {
const [request, response, promptAsync] = Google.useAuthRequest({
expoClientId: '938415613346-3ecn64agj1971r8l0s520kc41d4s0n6p.apps.googleusercontent.com',
androidClientId: '938415613346-f70dmihvkcjpjo3ljm798e85t5g45s2i.apps.googleusercontent.com',
redirectUri: Platform.select({
ios: undefined,
android: makeRedirectUri({
native: `com.geeekgod.bloodline.auth://`,
}),
}),
});

React.useEffect(() => {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"expo-random": "~12.3.0",
"expo-splash-screen": "~0.16.2",
"expo-status-bar": "~1.4.0",
"expo-updates": "~0.14.6",
"native-base": "^3.4.16",
"react": "18.0.0",
"react-native": "0.69.6",
Expand Down
47 changes: 46 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@
uuid "^3.4.0"
wrap-ansi "^7.0.0"

"@expo/code-signing-certificates@^0.0.2":
"@expo/code-signing-certificates@0.0.2", "@expo/code-signing-certificates@^0.0.2":
version "0.0.2"
resolved "https://registry.yarnpkg.com/@expo/code-signing-certificates/-/code-signing-certificates-0.0.2.tgz#65cd615800e6724b54831c966dd1a90145017246"
integrity sha512-vnPHFjwOqxQ1VLztktY+fYCfwvLzjqpzKn09rchcQE7Sdf0wtW5fFtIZBEFOOY5wasp8tXSnp627zrAwazPHzg==
Expand Down Expand Up @@ -4176,6 +4176,11 @@ expo-crypto@~11.0.0:
resolved "https://registry.yarnpkg.com/expo-crypto/-/expo-crypto-11.0.0.tgz#e434ebede6bae20f5a5cf7d7ea99d41e7b67690e"
integrity sha512-EH1Ikcy/HxfLJpo+zVRic4Igl6AovZEksAheKfeM2u+2TfL3FEBiQo+cGkuIa8NQ9ui3xYqQcyMk+IIZ6AO0Xg==

expo-eas-client@~0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/expo-eas-client/-/expo-eas-client-0.3.0.tgz#21383fc95a52e71e13c7276456db20388fefcf95"
integrity sha512-dBD00lJ629ayh5abbmgn6I1Z5NOaWM1iea2ODLd/EF1ZcS1P3yiPm6blpvL/tD+uewL8gxxmla/Ac+SiDdYAYA==

expo-error-recovery@~3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/expo-error-recovery/-/expo-error-recovery-3.2.0.tgz#3a4543382904a5e70829cb41d7fc0f022c2bef6e"
Expand All @@ -4196,6 +4201,11 @@ expo-font@~10.2.1:
dependencies:
fontfaceobserver "^2.1.0"

expo-json-utils@~0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/expo-json-utils/-/expo-json-utils-0.3.0.tgz#0c4a0195ee2bbde02cbb5f4d384d1cb63bea7493"
integrity sha512-ceo0pWFJqRAsNjZWX3rVDhy+NDzmrBNFOdvW+HE4EHqlt+OEUu9INIYKO8fU+g3ifI0VcKqHfvvj5wKsSpvPBw==

expo-keep-awake@~10.2.0:
version "10.2.0"
resolved "https://registry.yarnpkg.com/expo-keep-awake/-/expo-keep-awake-10.2.0.tgz#46f04740bccd321732bbbed93491e2076d5dbbd7"
Expand All @@ -4219,6 +4229,13 @@ expo-location@~14.3.0:
dependencies:
"@expo/config-plugins" "~5.0.0"

expo-manifests@~0.3.0:
version "0.3.1"
resolved "https://registry.yarnpkg.com/expo-manifests/-/expo-manifests-0.3.1.tgz#52c3ef41d3b1958039be0434363e6499c773aaf6"
integrity sha512-zv2a4pzhbvxVjrTO4XEiP5THt4RwtxyJjfixFhDNfHtDQR7fS4h9sZSGX9ind+IS5SQJQ2ykfVAi8xnwP6zHaw==
dependencies:
expo-json-utils "~0.3.0"

[email protected]:
version "0.10.3"
resolved "https://registry.yarnpkg.com/expo-modules-autolinking/-/expo-modules-autolinking-0.10.3.tgz#31bfcf3e4b613a7c3949fb1f1e9c23eea4c14caf"
Expand Down Expand Up @@ -4258,6 +4275,34 @@ expo-status-bar@~1.4.0:
resolved "https://registry.yarnpkg.com/expo-status-bar/-/expo-status-bar-1.4.0.tgz#c0317de2c53878340f4b4f00ff7e4ba14399a7fb"
integrity sha512-vh98g8qMIjig/2XTBsoAWS6Vo2dIIwDWjB3/GiuZ9Lazpxc9GO/APfJ4dar7MibzIDUKIrjotrcL6rLdPH13Ew==

expo-structured-headers@~2.2.0:
version "2.2.1"
resolved "https://registry.yarnpkg.com/expo-structured-headers/-/expo-structured-headers-2.2.1.tgz#739f969101de6bead921eee59e5899399ad67715"
integrity sha512-nY6GuvoS/U5XdhfBNmvXGRoGzIXywXpSZs2wdiP+FbS79P9UWyEqzgARrBTF+6pQxUVMs6/vdffxRpwhjwYPug==

expo-updates-interface@~0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/expo-updates-interface/-/expo-updates-interface-0.7.0.tgz#f4f03b61dbdd949cac9fb44e250e1162ba177650"
integrity sha512-saThnbrYDSjKxfMFFguAvh5o5KGabvAOHItkJRwq2L3c0T/3q26Q0kM83880h/+TTtAVsl1+Vhny9d+ImD3yvQ==

expo-updates@~0.14.6:
version "0.14.6"
resolved "https://registry.yarnpkg.com/expo-updates/-/expo-updates-0.14.6.tgz#bf2318dd58f1c293c0f7e463a6f942e3ca511a79"
integrity sha512-JmE3nsbL8cUAV2slhIqqNIG+jEYCJJvPzSYcUBd15s0sg0xxRbasNaEfnSIrYtZMjhl/YNwMgQzUkU6C2NtXyg==
dependencies:
"@expo/code-signing-certificates" "0.0.2"
"@expo/config" "~7.0.1"
"@expo/config-plugins" "~5.0.1"
"@expo/metro-config" "~0.4.0"
arg "4.1.0"
expo-eas-client "~0.3.0"
expo-manifests "~0.3.0"
expo-structured-headers "~2.2.0"
expo-updates-interface "~0.7.0"
fbemitter "^3.0.0"
resolve-from "^5.0.0"
uuid "^3.4.0"

expo-web-browser@~11.0.0:
version "11.0.0"
resolved "https://registry.yarnpkg.com/expo-web-browser/-/expo-web-browser-11.0.0.tgz#5116a99a32f8b98fc47a6aff026b4d608ffe18ec"
Expand Down

0 comments on commit edf310b

Please sign in to comment.