Hello Everyone,
With this post, I would like to share that AIOHA based login with HiveAuth on iOS application is done.
Of course, above code / function is partial. Here is the other half in which I have handled edge cases like if user has already logged in, if user cancelled signing-in etc.
At the end, I am also sending the proof which was signed. This can be used by backend to verify & issue JWT token.
So, I have above function in index.html file which I've added as an asset of flutter project as indicated below
Now, I load this HTML file with headless in-app-webview & using that webview I can run javascript within application at any given point of time.
I didn't find solution at first & kept getting either errors or null results. Finally after having lot of back & forth with ChatGPT 🤣, we finally decided to implement handler based approach to execute javascript & get result from js to dart/flutter app.
Final Working Output
Finally, we are getting a success callback after scanning QR code which is passed to flutter app & flutter app shows above message at the moment.
Next Steps
- ✅ iOS - HiveAuth integration is done
- ⏳ Android - HiveAuth integration is in progress
- 💻 Build a plugin so that we can use it in any application
- 💻 Upvote, Comment, Reblog, Follow, Unfollow etc
❤️ Love the work I do, support @threespeak & me ❤️
Vote sagarkothari88 as Hive Witness
Vote for 3Speak as Witness
Uploaded using 3Speak Mobile App