@rathfi/auth-sdk
v0.1.0
Published
Browser client for the Rath authentication popup flow.
Readme
@rathfi/auth-sdk
Browser SDK for opening the Rath authentication popup and exchanging its authorization code with the Rath Account API.
import {
createRathAuthRequest,
exchangeRathAuthCode,
openRathAuthPopup,
} from "@rathfi/auth-sdk/product";openRathAuthPopup creates a PKCE request, opens the supplied Rath auth
origin, and resolves with the authorization code and verifier. Use
exchangeRathAuthCode to exchange that result at your Account API endpoint.
The package is intended for browser applications and requires Web Crypto,
fetch, and popup APIs.
Publishing
Publishing is manual. Before the first release, authenticate with npm and
verify that the authenticated user belongs to the rathfi organization and
has ownership or publish access for @rathfi/auth-sdk:
npm whoami
npm org ls rathfi
npm owner ls @rathfi/auth-sdkFor a genuinely new package, the ownership command may report that the package
does not exist yet. In that case, confirm with an npm organization owner that
the authenticated account may create public packages under the @rathfi
scope before continuing.
Run the repository package check, then publish from the SDK directory:
pnpm sdk:package-check
cd src/sdk
npm publish --access publicDo not automate this release until package ownership and the release process have been established.
