npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@qubic-connect/redirect

v1.2.1

Published

```txt # https://sequencediagram.org/ title Qubic Connect Auth Flow bottomparticipants participant "Client" as client participant "Client Service" as clientService participant "Qubic Connect SDK" as sdk participant "Auth Web" as auth participant "Qubic Wa

Downloads

183

Readme

qubic connect auth flow

# https://sequencediagram.org/
title Qubic Connect Auth Flow
bottomparticipants
participant "Client" as client
participant "Client Service" as clientService
participant "Qubic Connect SDK" as sdk
participant "Auth Web" as auth
participant "Qubic Wallet" as wallet
participant "Qubic Auth Admin Api" as adminApi

entryspacing 1.0

## loginWithRedirect
note over client, wallet: loginWithRedirect

client->sdk:loginWithRedirect\n
	sdk->auth:navigate to auth web\n{\n  action: 'login' \n  walletType\n  qubicSignInProvider\n  redirectUrl\n  apiKey\n  dataString\n\n}

	alt Qubic Wallet and has redirectUrl
		auth->wallet:navigate to wallet\n{\n  ticketRedirectUrl,\n  provider: 'facebook' | 'google' | 'apple' | 'yahoo'\n}
wallet->wallet:sign in success and get ticket from wallet service
		sdk<--wallet:response\n{\n  action: 'login'\n  accountAddress\n  signature: ticket\n  dataString\n  isQubicUser: true\n}\n// when isQubicUser true signature would be a ticket from wallet service\n
	else WalletConnect/Metamask
		auth->auth:active wallet and sign
		sdk<--auth:response\n{\n  action: 'login'\n  accountAddress\n  signature\n  dataString\n  isQubicUser: false\n\n}

end

sdk->sdk:handleRedirectUrl\n
sdk->adminApi:以 qubic wallet 登入\n/services/auth/qubic\npayload {address,ticket} \n\n其他錢包登入\n/services/auth\npayload {provider, signature, address data}
sdk<--adminApi:response {accessToken, expiredAt, isQubicUser}
sdk->sdk
client<--sdk:trigger onAuthChanged\n{\n  method\n  address\n  accessToken\n  expiredAt\n  provider\n  qubicUser\n}

## bindWithRedirect

note over client, adminApi: bindWithRedirect


client->sdk:bindWithRedirect\n
sdk->adminApi:clientTicketIssue\n
sdk<-adminApi:response { ticket, expiredAt }
	sdk->auth:navigate to auth web\n{\n  action: 'bind'\n  clientTicket\n  walletType\n  qubicSignInProvider\n  redirectUrl\n  apiKey\n  dataString\n}\n\n


else action:bind
	alt Qubic Wallet
    auth->wallet:navigate to wallet\n{\n  ticketRedirectUrl,\n  provider: 'facebook' | 'google' | 'apple' | 'yahoo'\n}
    wallet->wallet:sign in success and get ticket from wallet service
	auth<--wallet:response\n{\n  ticket\n  expiredAt\n  address\n}
    else WalletConnect/Metamask
		auth->auth:active wallet and sign
	end
auth->adminApi:以 qubic wallet 登入\n/services/auth/qubic\npayload {address,ticket} \n\n其他錢包登入\n/services/auth\npayload {provider, signature, address data} \n\n帶入 clientTicket \nheaders { X-Qubic-Client-Ticket }
auth<--adminApi:response {accessToken, expiredAt, isQubicUser, clientId, merchantName, clientIconUrl}
	auth->auth:show confirm auhtorized to user\n
auth->adminApi:gql PrimeBind \nheaders { X-Qubic-Client-Ticket }
auth<--adminApi:response { bindTicket, expireTime }
	sdk<--auth:response \n{\n  action: 'bind',\n  bindTicket: string,\n  expiredAt: number\n}


sdk->sdk:handleRedirectUrl\n

client<--sdk:trigger onBindTicketResult\n{\n  bindTicket,\n  expiredAt,\n}
client->clientService:sendBindToken to client service
client<--clientService:bind success with credential\n{\n  identityTicket,\n  expiredAt,\n  address\n}

note over client,adminApi:After binding success, you can login with client service

client->clientService:login
client<--clientService:response with credential\n{\n  identityTicket,\n  expiredAt,\n  address\n}
client->sdk:loginWithCredential
sdk->adminApi:/services/auth/prime\npayload {identityTicket, address}\n
sdk<--adminApi:response {accessToken, expiredAt, isQubicUser}
client<--sdk:trigger onAuthChanged\n{\n  method\n  address\n  accessToken\n  expiredAt\n  provider\n  qubicUser\n}