@tgam/tgam-cognito
v1.0.6
Published
The Globe and Mail's cognito library
Downloads
3
Keywords
Readme
Welcome to @tgam-cognito
Description
This package is used for custom AWS cognito implementation within the front end project.
How To Use It
Primerly, your application would need to pass in the configurations to help the package to determin how would the url of request parameters should look like.
Within your project, you will have to generate an object, and pass it into generateParams
, serializeUrl
, or generateCallbackQuery
.
Example:
const getConfig = () => {
return {
clientId: <client_id_from_project_env>,
responseType: <response_type_from_project_env>,
scope: <scope_from_project_env>
base_url: <base_url_from_project_env>,
redirect_uri: <redirect_uri_from_project_env>
}
}
generateParams(getConfig(), <route_query>, <rememberMe | optional>)