arcange avatar

Hive Authentication Services - HTML code example

arcange

Published: 16 Jun 2022 › Updated: 16 Jun 2022Hive Authentication Services - HTML code example

Hive Authentication Services - HTML code example

alt

Since its launch a few months ago, more and more applications integrate HiveAuth as an authentication method.

For developers, the major advantage of supporting HiveAuth is that it makes their application easy to use for anyone with a Hive account, both on desktop and mobile. In addition, HiveAuth support avoids users having to provide their private keys, which reinforces the security and the feeling of trust in the application they use.

HiveAuth integration is so easy!

Although integrating HiveAuth is really child's play, sometimes developers feel intimidated reading the extensive technical documentation.

That's why I decided to provide them with an example of HiveAuth integration in a simple HTML file. No library, no framework, just a few lines of HTML and javascript code.
It will let you see how easy it is to integrate HiveAuth into your application.

It is available in open-source on Github.

The example consists of a small HTML file (and a logo image file) that you can open in your browser:

alt

After entering your username and clicking on the button, it will display a QR code that you can scan with Keychain Mobile

alt

You just have to open Keychain, scan the code and approve the authentication request.

alt

You will then be able to broadcast a sample custom_json operation to the Hive blockchain using either your Posting key or Active Key.

alt

Approve (or decline) the transaction request with Keychain on your mobile

alt

As soon as you approve the operation via Keychain, the HTML code will display a notification.

alt

Thanks to this concise example, it will only be easier for any developer to integrate HiveAuth as an authentication method in their applications.

Source code, documentation and support

As mentioned at the beginning of the article, the source code for this sample, as well as other sample code and libraries you can use to make your job easier, is available on Github.

The HAS documentation has been updated with references to this new example.

Finally, if you need help integrating HiveAuth into your (d)Apps, support is provided on Discord


Support the HiveAuth project
Vote for the proposal on PeakD
Vote for the proposal on Ecency
vote for the proposal on Hive.blog
Vote for the proposal using HiveSigner

Check out my apps and services


Vote for me as a witness alt

Leave Hive Authentication Services - HTML code example to:

Written by

Witness - Creator of HiveBuzz, HiveSQL, HiveAuth, Engage, Hive.NET, Hive Recovery, Hive Autoclaim, Xfer

Read more #hive-139531 posts


Best Posts From arcange

We have not curated any of arcange'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 arcange