create account

Experimenting with AIOHA package & trying to integrate it in flutter project by sagarkothari88

View this thread on: hive.blogpeakd.comecency.com
· @sagarkothari88 ·
$20.99
Experimenting with AIOHA package & trying to integrate it in flutter project
Hello @techcoderx 

Saw your annoucement that now you are @vibecoderx 
& was april-fooled for almost 1 hour 🤣
Realized only after reading comments

## Understanding Setup

Let's get to the subject. I am experimenting with AIOHA & trying to integrate it in Flutter project. As you know that, flutter project supports multiple platforms. My flutter project intends to support web, iOS & Android. To start with, I'm focusing on web support.

Here is how flutter-web-app folder structure looks like.

![Screenshot 2025-04-19 at 5.52.31 AM.png](https://files.peakd.com/file/peakd-hive/sagarkothari88/23t77MGo8X9JSXzWtEApCebnDG2hA5PzC4G64Rd3TCZcVf7n1KKyquvJtdRgVn2fLESkw.png)

I have added following script tag in body.

```
<script type="module">
      import * as Aioha from "./aioha@1.6.0-beta.4.js";
      window.Aioha = Aioha;
      console.log("Aioha initialized", aioha);
      aiohaInitialized = true;
</script>
```

In another script tag, I've added following code to make sure that I access AIOHA only after it is available.

```
var aiohaInitialized = false;
let aioha = null;

async function someFunctionToUse(some, params) {
    if (!aiohaInitialized) {
        console.error("Aioha not initialized");
        // try again after few miliseconds when aioha@1.6.0-beta.4.js is available/downloaded
        return;
    }
    if (aioha === null) {
        // we have aioha.js, let's set up an aioha instance
        aioha = window.Aioha.initAioha({
            hiveauth: {
                name: "AiohaExperiments",
                description: "Testing aioha login - keychain & hiveauth methods",
            },
        });
    }
    // we are good to go to use aioha
}
```

### Understanding Error

HiveKeychain based login works very well & I didn't face any error. However, HiveAuth started giving me error.

![Aioha-HiveAuth](https://files.peakd.com/file/peakd-hive/sagarkothari88/23t7939qyNRh7yvj6dBEbzakqkMTU7Zg9hJ2ro41AMWmgG6uj5NL8UZ7Xqv81SqTYSDkk.png)

So, when I tried logging in with HiveAuth, I got error.

![Error in HiveAuth](https://files.peakd.com/file/peakd-hive/sagarkothari88/23t76pL8Gwfb17doomk7gCs7pM6Mie4ZgrZ4CKjb3jMpCexN83P1FEmjr7NPXq7UeMCY1.png)

Error from console

![HiveAuth-aes.bundle.js not on my server](https://files.peakd.com/file/peakd-hive/sagarkothari88/23tGbncXXLGsTtYStrCTo47fCJ4Hmy6kd9DK4LkKNMRJ6zBWXt2TJFhNVTBqNXM32VBda.png)

Network Tab from Chrome Inspector

![Network Tab from Chrome Inspector](https://files.peakd.com/file/peakd-hive/sagarkothari88/23t79KzCSJ8NDatMoD8c51VvcSBUmZQxiEsgwDZVFfWcYZiHiYeorGW5EfrBXT1zQ1rht.png)

### Next Steps

- I request @techcoderx to look into this issue.
- I assume by bundling together, we can avoid that issue. I'm not js/front-end expert here so may be I am wrong.
- Once, this issue is solved, I'll switch to iOS & Android integration

-----

❤️ Love the work I do, support @threespeak & me ❤️

<center>

[![Support @sagarkothari88](https://images.hive.blog/u/sagarkothari88/avatar)](https://witness.the-hive-mobile.app/#/witnesses/@sagarkothari88)
### [Vote sagarkothari88 as Hive Witness](https://witness.the-hive-mobile.app/#/witnesses/@sagarkothari88)

[![Support @threespeak](https://images.hive.blog/u/threespeak/avatar)](https://witness.the-hive-mobile.app/#/witnesses/@threespeak)

### [Vote for 3Speak as Witness](https://witness.the-hive-mobile.app/#/witnesses/@threespeak)
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 159 others
properties (23)
authorsagarkothari88
permlinkexperimenting-with-aioha-package-and-trying-to-integrate-it-in-flutter-project
categorythreespeak
json_metadata{"app":"peakd/2025.4.5","format":"markdown","tags":["threespeak","dev","hive","updates","india","bee","pob","flutter","aioha","hiveauth"],"users":["techcoderx","vibecoderx","1.6.0-beta.4.js","threespeak","sagarkothari88"],"image":["https://files.peakd.com/file/peakd-hive/sagarkothari88/23t77MGo8X9JSXzWtEApCebnDG2hA5PzC4G64Rd3TCZcVf7n1KKyquvJtdRgVn2fLESkw.png","https://files.peakd.com/file/peakd-hive/sagarkothari88/23t7939qyNRh7yvj6dBEbzakqkMTU7Zg9hJ2ro41AMWmgG6uj5NL8UZ7Xqv81SqTYSDkk.png","https://files.peakd.com/file/peakd-hive/sagarkothari88/23t76pL8Gwfb17doomk7gCs7pM6Mie4ZgrZ4CKjb3jMpCexN83P1FEmjr7NPXq7UeMCY1.png","https://files.peakd.com/file/peakd-hive/sagarkothari88/23tGbncXXLGsTtYStrCTo47fCJ4Hmy6kd9DK4LkKNMRJ6zBWXt2TJFhNVTBqNXM32VBda.png","https://files.peakd.com/file/peakd-hive/sagarkothari88/23t79KzCSJ8NDatMoD8c51VvcSBUmZQxiEsgwDZVFfWcYZiHiYeorGW5EfrBXT1zQ1rht.png","https://images.hive.blog/u/sagarkothari88/avatar","https://images.hive.blog/u/threespeak/avatar"]}
created2025-04-19 00:42:42
last_update2025-04-19 00:42:42
depth0
children13
last_payout2025-04-26 00:42:42
cashout_time1969-12-31 23:59:59
total_payout_value10.508 HBD
curator_payout_value10.483 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,368
author_reputation527,834,338,970,785
root_title"Experimenting with AIOHA package & trying to integrate it in flutter project"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id142,181,894
net_rshares60,150,469,641,053
author_curate_reward""
vote details (223)
@acgalarza ·
Challenging but impressive work, @sagarkothari88! Respect! 👍

!DIY
!POB
!CCC
properties (22)
authoracgalarza
permlinkre-sagarkothari88-2025419t11810158z
categorythreespeak
json_metadata{"tags":["threespeak","dev","hive","updates","india","bee","pob","flutter","aioha","hiveauth"],"app":"ecency/4.0.3-vision","format":"markdown+html"}
created2025-04-19 09:08:09
last_update2025-04-19 09:08:09
depth1
children1
last_payout2025-04-26 09:08:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length76
author_reputation91,202,068,459,270
root_title"Experimenting with AIOHA package & trying to integrate it in flutter project"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id142,186,401
net_rshares0
@sagarkothari88 ·
Thank you @acgalarza
<br/><sub>[via Inbox](https://inbox.the-hive-mobile.app)</sub>
properties (22)
authorsagarkothari88
permlinkre-sagarkothari88-20250420t105851717
categorythreespeak
json_metadata{"tags":["hive-inbox","ios","android","mobile","app","sagarkothari88","comment","reply"],"app":"Inbox","developer":"sagarkothari88","format":"markdown+html","ts":"2025-04-20T10:58:51.718","hash":"MjAyNS0wNC0yMFQxMDo1ODo1MS43MThfYld4cmIwWjViM1ZZU1V3d1NIZFhUblJoVEhGNE5tbDNjM2hzTUd0MVUxUT0=","version":"1.2.0","route":"Dashboard","os":"Web"}
created2025-04-20 05:28:54
last_update2025-04-20 05:28:54
depth2
children0
last_payout2025-04-27 05:28:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length83
author_reputation527,834,338,970,785
root_title"Experimenting with AIOHA package & trying to integrate it in flutter project"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id142,201,021
net_rshares0
@bhr-curation ·
Cool! 🎉 AIOHA in Flutter for web, iOS, & Android sounds ambitious. Excited to see your progress, especially web support! Keep us updated. 😉
properties (22)
authorbhr-curation
permlinkexperimenting-with-aioha-package-and-trying-to-integrate-it-in-flutter-project-1745023442889
categorythreespeak
json_metadata{}
created2025-04-19 00:44:03
last_update2025-04-19 00:44:03
depth1
children0
last_payout2025-04-26 00:44:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length139
author_reputation3,498,334,985,020
root_title"Experimenting with AIOHA package & trying to integrate it in flutter project"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id142,181,906
net_rshares0
@indiaunited ·
Indiaunited Curation 1745038507572
This post has been manually curated by @bhattg from Indiaunited community. Join us on our [Discord Server](https://discord.gg/bGmS2tE). 

Do you know that you can earn a passive income by delegating to @indiaunited. We share more than 100 % of the curation rewards with the delegators in the form of IUC tokens. HP delegators and IUC token holders also get upto 20% additional vote weight. 

Here are some handy links for delegations: [100HP](https://hivesigner.com/sign/delegateVestingShares?delegator=&delegatee=indiaunited&vesting_shares=167787.01035298305%20VESTS), [250HP](https://hivesigner.com/sign/delegateVestingShares?delegator=&delegatee=indiaunited&vesting_shares=419467.5258824577%20VESTS), [500HP](https://hivesigner.com/sign/delegateVestingShares?delegator=&delegatee=indiaunited&vesting_shares=838935.0517649153%20VESTS), [1000HP](https://hivesigner.com/sign/delegateVestingShares?delegator=&delegatee=indiaunited&vesting_shares=1677870.1035298307%20VESTS). 

[![image.png](https://files.peakd.com/file/peakd-hive/bala41288/46eaz12N-image.png)](https://discord.gg/bGmS2tE) 

<sub>**100% of the rewards from this comment goes to the curator for their manual curation efforts. Please encourage the curator @bhattg by upvoting this comment and support the community by voting the posts made by @indiaunited.**</sub>
👍  
properties (23)
authorindiaunited
permlinkindiaunited-1745038507572
categorythreespeak
json_metadata{"app":"hiveblog/0.1","format":"markdown","tags":["threespeak","dev","hive","updates","india","bee","pob","flutter","aioha","hiveauth"]}
created2025-04-19 04:55:09
last_update2025-04-19 04:55:09
depth1
children1
last_payout2025-04-26 04:55:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,328
author_reputation95,067,314,598,128
root_title"Experimenting with AIOHA package & trying to integrate it in flutter project"
beneficiaries
0.
accountbhattg
weight10,000
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id142,184,177
net_rshares4,001,621,864
author_curate_reward""
vote details (1)
@sagarkothari88 ·
Thank you @bhattg & @indiaunited for support
<br/><sub>[via Inbox](https://inbox.the-hive-mobile.app)</sub>
properties (22)
authorsagarkothari88
permlinkre-sagarkothari88-20250419t134126668
categorythreespeak
json_metadata{"tags":["hive-inbox","ios","android","mobile","app","sagarkothari88","comment","reply"],"app":"Inbox","developer":"sagarkothari88","format":"markdown+html","ts":"2025-04-19T13:41:26.668","hash":"MjAyNS0wNC0xOVQxMzo0MToyNi42NjhfYld4cmIwWjViM1ZZU1V3d1NIZFhUblJoVEhGNE5tbDNjM2hzTUd0MVUxUT0=","version":"1.2.0","route":"Dashboard","os":"Web"}
created2025-04-19 08:11:30
last_update2025-04-19 08:11:30
depth2
children0
last_payout2025-04-26 08:11:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length107
author_reputation527,834,338,970,785
root_title"Experimenting with AIOHA package & trying to integrate it in flutter project"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id142,185,837
net_rshares0
@sanjeevm ·
What is AIOHA ?
properties (22)
authorsanjeevm
permlinkre-sagarkothari88-suy8aa
categorythreespeak
json_metadata{"tags":["threespeak"],"app":"peakd/2025.4.6","image":[],"users":[]}
created2025-04-19 04:54:09
last_update2025-04-19 04:54:09
depth1
children1
last_payout2025-04-26 04:54:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length15
author_reputation677,957,137,790,659
root_title"Experimenting with AIOHA package & trying to integrate it in flutter project"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id142,184,168
net_rshares0
@sagarkothari88 ·
All in one Hive Authentication
Developed by one of top Hive Witness - @techcoderx
https://peakd.com/@aioha/posts
<br/><sub>[via Inbox](https://inbox.the-hive-mobile.app)</sub>
properties (22)
authorsagarkothari88
permlinkre-sagarkothari88-20250419t134207457
categorythreespeak
json_metadata{"tags":["hive-inbox","ios","android","mobile","app","sagarkothari88","comment","reply"],"app":"Inbox","developer":"sagarkothari88","format":"markdown+html","ts":"2025-04-19T13:42:07.457","hash":"MjAyNS0wNC0xOVQxMzo0MjowNy40NTdfYld4cmIwWjViM1ZZU1V3d1NIZFhUblJoVEhGNE5tbDNjM2hzTUd0MVUxUT0=","version":"1.2.0","route":"Dashboard","os":"Web"}
created2025-04-19 08:12:09
last_update2025-04-19 08:12:09
depth2
children0
last_payout2025-04-26 08:12:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length175
author_reputation527,834,338,970,785
root_title"Experimenting with AIOHA package & trying to integrate it in flutter project"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id142,185,840
net_rshares0
@techcoderx ·
Aioha core is code-splitted by default to keep main bundle size as small as possible, dependencies from some providers are only loaded when it is being used. If you're not using the CDN or `pnpm i` you have to download all vendor bundles which are `hiveauth-aes.bundle.js` and `ledger.bundle.js` from the same place where you downloaded the main bundle.
👍  
properties (23)
authortechcoderx
permlinkre-sagarkothari88-suxyov
categorythreespeak
json_metadata{"tags":["threespeak"],"app":"peakd/2025.4.6","image":[],"users":[]}
created2025-04-19 01:26:57
last_update2025-04-19 01:26:57
depth1
children1
last_payout2025-04-26 01:26:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length353
author_reputation47,713,359,139,491
root_title"Experimenting with AIOHA package & trying to integrate it in flutter project"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id142,182,247
net_rshares0
author_curate_reward""
vote details (1)
@sagarkothari88 ·
Okay. I'll give that a try & let you know. Thank you @techcoderx for quick reply.
<br/><sub>[via Inbox](https://inbox.the-hive-mobile.app)</sub>
properties (22)
authorsagarkothari88
permlinkre-sagarkothari88-20250419t084323416
categorythreespeak
json_metadata{"tags":["hive-inbox","ios","android","mobile","app","sagarkothari88","comment","reply"],"app":"Inbox","developer":"sagarkothari88","format":"markdown+html","ts":"2025-04-19T08:43:23.416","hash":"MjAyNS0wNC0xOVQwODo0MzoyMy40MTZfYld4cmIwWjViM1ZZU1V3d1NIZFhUblJoVEhGNE5tbDNjM2hzTUd0MVUxUT0=","version":"1.2.0","route":"Dashboard","os":"Web"}
created2025-04-19 03:13:24
last_update2025-04-19 03:13:24
depth2
children0
last_payout2025-04-26 03:13:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length144
author_reputation527,834,338,970,785
root_title"Experimenting with AIOHA package & trying to integrate it in flutter project"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id142,183,176
net_rshares0
@weone ·
Hmm, wht new tools are you building now...
properties (22)
authorweone
permlinkre-sagarkothari88-2025419t11405872z
categorythreespeak
json_metadata{"tags":["threespeak","dev","hive","updates","india","bee","pob","flutter","aioha","hiveauth"],"app":"ecency/4.0.3-vision","format":"markdown+html"}
created2025-04-19 06:11:03
last_update2025-04-19 06:11:03
depth1
children1
last_payout2025-04-26 06:11:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length42
author_reputation7,921,066,488,114
root_title"Experimenting with AIOHA package & trying to integrate it in flutter project"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id142,184,877
net_rshares0
@sagarkothari88 ·
3Speak Mobile Application - All over again
Packages/Libraries which I used have expired
For a new release, I must start from scratch
<br/><sub>[via Inbox](https://inbox.the-hive-mobile.app)</sub>
properties (22)
authorsagarkothari88
permlinkre-sagarkothari88-20250419t134106806
categorythreespeak
json_metadata{"tags":["hive-inbox","ios","android","mobile","app","sagarkothari88","comment","reply"],"app":"Inbox","developer":"sagarkothari88","format":"markdown+html","ts":"2025-04-19T13:41:06.806","hash":"MjAyNS0wNC0xOVQxMzo0MTowNi44MDZfYld4cmIwWjViM1ZZU1V3d1NIZFhUblJoVEhGNE5tbDNjM2hzTUd0MVUxUT0=","version":"1.2.0","route":"Dashboard","os":"Web"}
created2025-04-19 08:11:09
last_update2025-04-19 08:11:09
depth2
children0
last_payout2025-04-26 08:11:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length195
author_reputation527,834,338,970,785
root_title"Experimenting with AIOHA package & trying to integrate it in flutter project"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id142,185,836
net_rshares0
@weone ·
Anything related to online trade...
properties (22)
authorweone
permlinkre-sagarkothari88-2025419t114113247z
categorythreespeak
json_metadata{"tags":["threespeak","dev","hive","updates","india","bee","pob","flutter","aioha","hiveauth"],"app":"ecency/4.0.3-vision","format":"markdown+html"}
created2025-04-19 06:11:15
last_update2025-04-19 06:11:15
depth1
children1
last_payout2025-04-26 06:11:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length35
author_reputation7,921,066,488,114
root_title"Experimenting with AIOHA package & trying to integrate it in flutter project"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id142,184,880
net_rshares0
@sagarkothari88 ·
nope
<br/><sub>[via Inbox](https://inbox.the-hive-mobile.app)</sub>
properties (22)
authorsagarkothari88
permlinkre-sagarkothari88-20250419t134013903
categorythreespeak
json_metadata{"tags":["hive-inbox","ios","android","mobile","app","sagarkothari88","comment","reply"],"app":"Inbox","developer":"sagarkothari88","format":"markdown+html","ts":"2025-04-19T13:40:13.903","hash":"MjAyNS0wNC0xOVQxMzo0MDoxMy45MDNfYld4cmIwWjViM1ZZU1V3d1NIZFhUblJoVEhGNE5tbDNjM2hzTUd0MVUxUT0=","version":"1.2.0","route":"Dashboard","os":"Web"}
created2025-04-19 08:10:15
last_update2025-04-19 08:10:15
depth2
children0
last_payout2025-04-26 08:10:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length67
author_reputation527,834,338,970,785
root_title"Experimenting with AIOHA package & trying to integrate it in flutter project"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id142,185,833
net_rshares0