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

fix: google oauth bug #140

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Changes from all 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
6 changes: 5 additions & 1 deletion TERMTERM/src/screens/Webview/GoogleLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ const GoogleLogin = ({ navigation }: HomeScreenProps) => {
const authApi = new AuthApi();
const memberApi = new MemberApi();

// Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36
const customUserAgent = "customUserAgent";

const logInProgress = (data: any) => {
const startIdx = data.indexOf("code=") + 5;
const endIdx = data.indexOf("&", startIdx);
Expand Down Expand Up @@ -69,7 +72,8 @@ const GoogleLogin = ({ navigation }: HomeScreenProps) => {
onMessage={(event) => {
logInProgress(event.nativeEvent.url);
}}
userAgent="Chrome/56.0.0.0 Mobile"
// userAgent="Chrome/56.0.0.0 Mobile"
userAgent={customUserAgent}
/>
</View>
);
Expand Down