Sagar Kothari avatar

Demo on integrating Hive Auth for Mobile Apps

sagarkothari88

Published: 21 Dec 2022 › Updated: 21 Dec 2022Demo on integrating Hive Auth for Mobile Apps

Demo on integrating Hive Auth for Mobile Apps





Watch on 3Speak



---

expected output

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.

image

Flutter to Native?

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.

image

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?


Support Me Back 🙏

Support 3Speak

Download Android AppVote me as Hive WitnessDownload iOS App
Join 3Speak DiscordSetup Encoder NodeVote for 3Speak Proposal
--Get a server

Cheers
Have a good one

---

3Speak

Posted from 3Speak iOS App for 3Speak
Developed and maintained by sagarkothari88@sagarkothari88

Leave Demo on integrating Hive Auth for Mobile Apps to:

Written by

App Developer on Hive - Distriator, Check in With XYZ, 3Speak, HiveSuite.app.

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