I am super new to this forum and framework7 but love everything so far.
I am building an app that utilising an existing Laravel based php MySQL website vía json responses using Ajax.
I am having an issue with login via Facebook as this is done with an external link and hence the token that I need to fetch is being returned on that external page.
Is there anyway to access from the framework7 dom? Or any suggestions would be great.
To reiterate, the user clicks on a link which has a class .external
They login via Facebook and a token is returned on that same page.
I need to access this token as a var so that I can run another function to authenticate and load the users data.
No, you can’t access another page DOM.
In cordova you usually use inapp browser or https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller. And usually that token presented in URL of that page, which you can read.
Also, read this https://medium.com/@jlchereau/stop-using-inappbrowser-for-your-cordova-phonegap-oauth-flow-a806b61a2dc5
And if you doing it for just “Login with Facebook” thing in cordova app then just go with this plugin https://github.com/jeduan/cordova-plugin-facebook4
You are an absolute champion, thank you kindly for your prompt response. You saved me countless hours.
I used the plugin you recommended that implements handleOpenURL, so instead of doing in internally, i used the target="_system" and when the user is returned, I can get the token which I used to authenticate and log the user in.