Posts

New features for developer - Use HIVE Onboard for your dApp

avatar of @hiveonboard
25
@hiveonboard
·
0 views
·
3 min read

While pretty much destructive stuff is going on in the crypto-world right now - I have been very productive in the last few days and it's time to push things forward on HIVE!

In this episode, I wanna give you an update about new features which can be used right now for any dApp out there which wants to make use of the account creation service from @hiveonboard.

Rationale

The amount of dApps available on HIVE is growing fast and in most cases developer have to make a decision on how to handle account creation for new user.

This let me think, why should each dApp reinvent the wheel when it comes to on-boarding new user to HIVE, when @hiveonboard already can handle the job pretty well?

If you ask me, developer should always focus on their use case first and care about what brings value for their user-base. Don't spend your time on stuff, that has already been solved!


1. Redirecting to your dApp after account creation

If you don't wanna mess around with account creation yourself, feel free to send your new user to hiveonboard.com passing in your redirect_url as a query parameter.

  • Sample URL straight to Account Creation https://hiveonboard.com/create-account?redirect_url=https://hive.io/eco

  • Sample URL with URI-Encoding to Landing Page https://hiveonboard.com/?redirect_url=https://hive.io/eco

When a user successfully created his HIVE account, he will immediately send back to your dApp. In this case step 3 "Choose your dApp" will be skipped entirely.

For best user experience, try to redirect to your login page and make sure the user can get started at once.

Update: @culgin brought up a scenario where a bad actor could use this feature to point user to a phishing website and do harm from there. In order to make user this cannot happen - I've just added a whitelist for authorized domains, which can make use of this feature. You can extent the URL with your path like /login or /signin as long as your URL starts with the value in the whitelist.

[ 
  "https://hive.blog", 
  "https://peakd.com", 
  "https://3speak.online", 
  "https://splinterlands.io", 
  "https://esteem.app", 
  "https://stem.openhive.network", 
  "https://steempress.io", 
  "https://actifit.io", 
  "https://dlease.io", 
  "https://dblog.org", 
  "https://brosgn.net", 
  "https://brosinopoker.com" 
] 

If you run a dApp which isn't included in the whitelist right now, please contact @roomservice or do a pull request on the whitelist in the repo.


2. Use your own HIVE account to create user for your dApp

I've already covered how @hiveonboard solved the lack of ressource credits problem with help of a server-side software in this post about a week ago. This time we take the idea even further.

I was asked by a dApp developer if it would be possible to bypass the account ticket load-balancer and prioritize a specific creator-api instance when a user is going to create an account.

Sure - why not? So here we go!

In case you run a creator-api for your very own dApp account and at least one account creation ticket available, you could just add the creator query parameter.

  • Sample URL straight to Account Creation https://hiveonboard.com/create-account?creator=my-dapp

  • Sample URL with URI-Encoding to Landing Page https://hiveonboard.com/?creator=my-dapp

If a user creates an account on hiveonboard.com now - the new account will be created by @my-dapp in this case and will act as the recovery account until changed by the user. In most cases it would make perfect sense to add redirect_url query parameter as well.

As a friendly reminder - you can choose from two different repositories for the creator-api: GitHub - original version with additional features by @fbslo GitHub - light-weight version with only api-support by @roomservice

If you want to make use of this feature for your dApp, please contact @roomservice.


3. Bonus - Debug Mode for testing account creation flow

If you want to take advantage of those features or just wanna see how @hiveonboard works, you can now add the debug_mode query parameter and see how it goes, without actually creating an account and skip phone verification.

  • Sample URL straight to Account Creation https://hiveonboard.com/create-account?debug_mode=true

  • Sample URL with URI-Encoding to Landing Page https://hiveonboard.com/?debug_mode=true


As always, I would love to hear your feedback and want to thank for your ongoing support!

Account Creation reports moved to @hiveonboard-log

If you are interested in those new accounts who joined the HIVE using @hiveonboard you can always look them up in the daily reports created. This reports moved to the blog of the account @hiveonboard-log because most of you don't wanna get spammed when following this account.

Quick Side-Note

I'am currently running a proposal for a HIVE ad-campaign on BRAVE browser.

If you like my work on @hiveonboard you may consider taking a look at my proposal and maybe vote for it: https://peakd.com/me/proposals/99

Yours, @roomservice