Wodin
Merged in a post:
Line login
Bond Piyapan
Im use Line login with expo-auth-session
with expo-dev-client
has issue 'Something went wrong trying to finish signing in. Please close this screen to go back to the app.'
my code :
const discovery = {
authorizationEndpoint: 'https://access.line.me/oauth2/v2.1/authorize',
}
const [request, result, promptAsync, response] = useAuthRequest(
{
scopes: ['profile', 'openid'],
clientId: '123456',
clientSecret: '12345',
responseType: 'code',
redirectUri: makeRedirectUri({
scheme: 'com.app.app',
useProxy: true,
}),
},
discovery,
)
useEffect(() => {
// TODO Line login
console.log('response', response)
console.log('result', result)
console.log('request', request)
}, [response, result])
Please help thank you.
Photo Viewer
View photos in a modal
Wodin
Merged in a post:
LINE login
長坂実
I hope add LINE login to the Authentication guide.
Scott Pritchard
I'd suggest using https://github.com/xmartlabs/react-native-line combined with EAS. Alternatively, they do have an oAuth compatible API (https://developers.line.biz/en/docs/line-login/integrate-line-login/) so it should be workable with https://docs.expo.io/versions/latest/sdk/auth-session/
Dai Dang
Scott Pritchard: Alternatively, they do have an oAuth compatible API (https://developers.line.biz/en/docs/line-login/integrate-line-login/) so it should be workable with https://docs.expo.io/versions/latest/sdk/auth-session/
=> is this possible?
Scott Pritchard
Dai Dang: Give it a try and let us know?
Dai Dang
Scott Pritchard: yes, thanks for your suggestion
Dai Dang
Scott Pritchard: on line-developers, we need setup callback-url
However, the url of expo is like ( exp://192.168.1.139:19000/+/redirect )
This url is invalid for LINE Callback-url
i'm confused!
Wodin
Dai Dang: Some authentication servers might not allow redirects to anything other than https://...
Also, redirects to Expo Go could be problematic.
There's a proxy service that is used to get around this sort of stuff, but not sure exactly how you use it if you're implementing LINE authentication. Maybe this will help, although it's talking about the Bare workflow: https://docs.expo.dev/versions/latest/sdk/auth-session/#proxy-service
See also https://docs.expo.dev/guides/linking/#example-using-linking-for-authentication and the next section.
Dai Dang
Wodin:
I will try it!
Thank you very much!
Photo Viewer
View photos in a modal