torusresearch/CustomAuth

triggerlogin always fail if catching exceptions

Closed this issue · 1 comments

sirpy commented

I have a strange behaviour
when i do
const user = await triggerLogin('google')
it works just fine
but if i do
const user = await triggerLogin('google').catch(e => ...)
an exception is thrown (user closed popup) and user is undefined
this issue prevents the ability to handle the real case exception when user actually doesn't finish login and closes the popup

sirpy commented

@YZhenY
this is solved on 1.0.1 when using redirect.html
but when switching to service worker issue is reproduced