# Login Solana users on React or Svelte or Vue or Vanilla TS

**URL:** <https://forum.dfinity.org/t/login-solana-users-on-react-or-svelte-or-vue-or-vanilla-ts/44907>\
**Category:** Developers\
**Created:** [April 25, 2025, 6:00pm UTC](https://forum.dfinity.org/t/login-solana-users-on-react-or-svelte-or-vue-or-vanilla-ts/44907 "2025-04-25T18:00:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kristofer](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/kristofer/32/11135_2.png) [@kristofer](https://forum.dfinity.org/u/kristofer)\
**Post date:** [April 25, 2025, 6:00pm UTC](https://forum.dfinity.org/t/login-solana-users-on-react-or-svelte-or-vue-or-vanilla-ts/44907/1 "2025-04-25T18:00:36Z")

</div>

I finally found some time to give the [ic-siws](https://github.com/kristoferlund/ic-siws) library the same treatment as ic-siwe received a while back.

In short, that means:

- Making some general security upgrades (not Odin hack related)
- Retiring the old frontend support library in favour of a new one that works, not only with React, but also with Svelte, Vue and Vanilla TS. Yaay.

## Demos!

There are several demo applications available that showcase the integration of the `ic_siws_provider` canister with different frontend frameworks. These demos provide a practical example of how to use the canister to implement Solana wallet authentication in your ICP application.

- React: [ic-siws-react-demo](https://github.com/kristoferlund/ic-siws-react-demo)
- Vue: [ic-siws-vue-demo](https://github.com/kristoferlund/ic-siws-vue-demo)
- Svelte: [ic-siws-svelte-demo](https://github.com/kristoferlund/ic-siws-svelte-demo)
- Vanilla TS: [ic-siws-vanilla-ts-demo](https://github.com/kristoferlund/ic-siws-vanilla-ts-demo)

## Details

- Library renamed to [ic-siws-js](https://www.npmjs.com/package/ic-siws-js) and moved to the [ic-siws](https://github.com/kristoferlund/ic-siws) monorepo.
- `SiwsIdentityProvider` now requires only the canister id as a parameter.
- React hook renamed from `useSiwsIdentity` to `useSiws`.
- Project now uses [xstate/store](https://stately.ai/docs/xstate-store) under the hood for state management instead of messy React Context.

# Migration from v0.0.1

## Frontend

Replace dependency in `package.json`:

```diff
- "ic-use-siws-identity": "^0.0.1",
+ "ic-siws-js": "^0.1.0",

```

Import new name React hook from new location:

```diff
- import { useSiwsIdentity } from "ic-use-siws-identity";
+ import { useSiws } from "ic-siws-js/react";

```

Import `SiweIdentityProvider` from new location:

```diff
- import { SiweIdentityProvider } from "ic-use-siwe-identity";
+ import { SiweIdentityProvider } from "ic-siwe-js/react";

```

Use new simplified config for `SiwsIdentityProvider`:

```diff
- <SiwsIdentityProvider<_SERVICE>
- canisterId={canisterId}
- idlFactory={idlFactory}
- >
+ <SiwsIdentityProvider canisterId={canisterId}>

```

## Provider canister

Use the latest version of the provider canister.

```diff
"ic_siws_provider": {
- "candid": "https://github.com/kristoferlund/ic-siws/releases/download/v0.0.2/ic_siws_provider.did",
+ "candid": "https://github.com/kristoferlund/ic-siws/releases/download/v0.1.0/ic_siws_provider.did",
- "wasm": "https://github.com/kristoferlund/ic-siws/releases/download/v0.0.2/ic_siws_provider.wasm.gz"
+ "wasm": "https://github.com/kristoferlund/ic-siws/releases/download/v0.1.0/ic_siws_provider.wasm.gz"
  //...

```

Let’s build!

🌱

---

<div class="post-metadata">

**Author:** ![C-B-Elite](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/c-b-elite/32/34356_2.png) [@C-B-Elite](https://forum.dfinity.org/u/C-B-Elite)\
**Post date:** [April 29, 2025, 5:45am UTC](https://forum.dfinity.org/t/login-solana-users-on-react-or-svelte-or-vue-or-vanilla-ts/44907/2 "2025-04-29T05:45:59Z")

</div>

Can we now consider that SIWB, SIWE, and SIWS have all undergone your audit and security hardening?

---

<div class="post-metadata">

**Author:** ![kristofer](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/kristofer/32/11135_2.png) [@kristofer](https://forum.dfinity.org/u/kristofer)\
**Post date:** [April 29, 2025, 6:28am UTC](https://forum.dfinity.org/t/login-solana-users-on-react-or-svelte-or-vue-or-vanilla-ts/44907/3 "2025-04-29T06:28:31Z")

</div>

SIWB is developed by AstroX. None of the packages should be considered to be formally audited.
