User agent update

User agent is being set to "okhttp/4.9.2" when using the below Google Sign in method with an existing idToken in expo
const data = await authClient.signIn.social({
provider: "google",
idToken: {
token: // Google ID Token,
accessToken: // Google Access Token
}
})
const data = await authClient.signIn.social({
provider: "google",
idToken: {
token: // Google ID Token,
accessToken: // Google Access Token
}
})
Anyway to send the actual userAgent along with the request instead of calling a custom API to manually update the userAgent?
6 Replies
FalconiZzare
FalconiZzareOP4d ago
@bekacru sorry for the ping, any idea?
bekacru
bekacru4d ago
the user agent is read from a header. unless the user agent header is changed somehow (maybe a proxy), it'd be the actual user agent sent in the request.
FalconiZzare
FalconiZzareOP4d ago
Thanks for the reply. I'm using both Google sign in method (one with expo browser and another which takes idToken) as per the documentation using 2 buttons on same screen. The first one sending the userAgent correctly. The second one that takes idToken is sending userAgent as okhttp.
No description
FalconiZzare
FalconiZzareOP4d ago
any insight on where to look for potential issue would be very helpful.
bekacru
bekacru4d ago
oh on expo the default one is okhttp. the reason on the first one it's properly set is cause, the request is made from in app browser.
FalconiZzare
FalconiZzareOP4d ago
Oh I see. Anyway built in way to update the header during the process? Or should I just update the record manually by calling my own API right after successful login?

Did you find this page helpful?