Published: 21 Dec 2022 › Updated: 21 Dec 2022
Demo on integrating Hive Auth for Mobile Apps
Intro
Hello Hive Community members,
- With this video, I would like to give you a demo on Hive Authentication system integration on mobile apps
- At the moment, I am using Flutter SDK to build apps
- In case, you are working on native app, you can refer to native code only.
Let’s get started.
- Okay. So, Let’s get started.
- On the right, you are looking at the mirroring of my Actual iPhone.
- On the left, you can see that I have opened Android Studio & You are looking at code which is written in Dart language.
- With Dart language & Flutter SDK you can build apps for multiple platforms.
Explore source code
- Let’s go to browser.
- https://github.com/sag333ar/hive_auth_demo
- Anyone can go ahead & fork the code which I’ve written.
- It is open source & available for all community members.
- We’ll take a look at the main.dart.
- Here you can see that, on tap of login button, I am invoking a native method with a parameter username.
- At the moment, username is static.
- But if you’re building an app, you can take the value from input field & pass that into this parameter.
Flutter to Native?
- How does flutter to native communication works?
- let’s find the answer from their website.
- https://docs.flutter.dev/development/platform-integration/platform-channels
What next?
- So, What happens after it?
- Native app invokes HAS with those params.
- HAS provides A QR Code String & with that QR code String, we do redirection to KeyChain app.
- As a user, you must have hive-keychain installed
- And also, it would be great if you’re logged in already
- If everything is set correctly, flutter app will launch HiveKeychain app.
- Once you provide authorisation from hive-kechain, navigate back to your flutter app.
Refresh
- Click on refresh.
- As a developer, you can also integrate auto-refresh, upon app resume. I leave that to you to integrate.
- Now, you can see the HAS-ID on the screen. Of course I have to keep it blurred for security reasons.
- It also shows expiry value.
Did it help?
- I hope this short video session was helpful for you guys.
- I want more devs to join Hive community.
- Hoping that with this tutorial, we’ll have more flutter & native devs showing interest.
Who am I?
- I am
@sagarkothari88.
- I am currently working on a mobile application for 3Speak community members
Support Me Back 🙏
- Vote me as your hive witness - https://hivesigner.com/sign/account-witness-vote?witness=sagarkothari88&approve=1
- Upvote my content
- Follow my channel
Support 3Speak
| - | - | |
Cheers
Have a good one
---
3Speak
Posted from 3Speak iOS App for 3Speak
Developed and maintained by @sagarkothari88
Leave Demo on integrating Hive Auth for Mobile Apps to:
Read more #hive posts
Best Posts From Sagar Kothari
We have not curated any of sagarkothari88's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Sagar Kothari
- HiveSuite Dev Update: Drafts Workspace, Scheduled Posts & Push Notification Support
- HiveSuite Dev Update: Community Subscription Integration, Comment Media Fixes & Faster Local Develop
- HiveSuite App & HiveReactKit Development Update for today
- HiveSuite Dev Update: Introducing Word Finder – A Daily Hive Word Puzzle
- HiveSuite Dev Update: Smarter Uploads, Posting Authority Management & Enhanced Media Viewing
- HiveSuite Dev Updates: Today was a slow day. Less updates
- HiveSuite Dev Update: Advanced Media Handling, Profile Enhancements & Upload Experience Improvements
- HiveReactKit Development Update: Improved Translation Engine, Version History & Advanced Post Inspection
- HiveSuite Development Update: Stable Hive Node Control, Advanced Media Viewer & Exchange Directory
- HiveSuite Dev Update: Exchanges Directory & Media Experience