Installation
Runnpm install @rownd/angular
or yarn add @rownd/angular
Usage
The library provides an Angular Module and Service for dependency injection. In the main app.module.ts file, add the Rownd module. You’ll also need to include the@ngrx/store
module as well, as Rownd will drive state updates
through it.
Module params
API Reference
requestSignIn() Trigger the Rownd sign-in dialog. This accepts an optional parameter with options to control the behavior of the sign in. See our SDK Docs for a full list of supported options.-
auto_sign_in
: boolean - when true, automatically trigger a sign-in attempt if identifier is included or an email address or phone number has already been set in the user data. -
identifier
: string - an email address or phone number (in E164 format) to which a verification message may be sent. If the Rownd app is configured to allow unverified users, then sign-in will complete without verification if the user has not signed in previously. -
post_login_redirect
: string - at the conclusion of a successful sign in, Rownd will redirect the user here. This can be a path on the current domain or a full URL.
waitForToken
: boolean - when true, if no access token is present or if it’s expired, the promise will not be resolved until a valid token is available. While unlikely, this could result in waiting forever.
true
until Rownd has fully loaded and
resolved the current user’s authentication status. This usually takes only a few
milliseconds, but if you make decisions that depend on the isAuthenticated$
value while isInitializing$
is still true
, your code/logic may not work as
you expect.