![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
coins-logon-widget
Advanced tools
COINS Logon Widget. Injectable utility to manage browser authorization with COINS
Injectable utility to manage browser authorization with COINS.
var widget = new CoinsLogonWidget({
el: document.getElementById('logon-area'),
baseUrl: 'http://localhost:9000/api/v1',
authCookieName: 'COINS_Auth_User-production'
});
Add a checkAuth
property with a value of true
to make the widget perform an initial authorization check against your API:
var widget = new CoinsLogonWidget({
el: document.getElementById('logon-area'),
baseUrl: 'http://localhost:9000/api/v1',
authCookieName: 'COINS_Auth_User-production',
checkAuth: true,
});
The widget will change to its logged-in state if the check is successful.
To make the widget redirect upon successful log in, add a redirect
property with a value of true
and a redirectUrl
property with the URL to redirect to.
var widget = new CoinsLogonWidget({
el: document.getElementById('logon-area'),
baseUrl: 'http://localhost:9000/api/v1',
authCookieName: 'COINS_Auth_User-production',
redirect: true,
redirectUrl: 'http://localhost:9000/my-app/',
});
You may call these methods on an instance of the widget:
Destroy the widget’s elements and remove all event handlers.
widget.destroy()
The widget extends Olical’s EventEmitter: all of its methods are available on an instance of CoinsLogonWidget
. The widget has a few custom events for which you can attach handlers:
Fired when one or more of the widget’s form fields aren’t valid.
widget.on('invalid', function(validations) {});
Fired when the widget begins a login API call.
widget.on('login:init', function() {});
Fired when the widget receives an error from the login API call.
widget.on('login:error', function(error) {});
Fired when the widget receives an “account expired” response from the login API call.
widget.on('login:accountExpired', function(apiResponse) {});
Fired when the widget receives an “account will expire” response from the login API call.
widget.on('login:accountWillExpire', function(apiResponse) {});
Fired when the widget receives a “password expired” response from the login API call.
widget.on('login:passwordExpired', function(apiResponse) {});
Fired when the widget receives a “password will expire” response from the login API call.
widget.on('login:passwordWillExpire', function(apiResponse) {});
Fired when the widget receives a successful response from the login API call.
widget.on('login:success', function(apiResponse) {});
Fired when the widget begins a logout API call.
widget.on('logout:init', function() {});
Fired when the widget receives an error response from the logout API call.
widget.on('logout:error', function(error) {});
Fired when the widget receives a successful response from the logout API call.
widget.on( 'logout:success', function(apiResponse) {});
See examples/index.html for more examples of widget use.
brew install libsass
on a Mac with Homebrew).npm install -g grunt-cli
git clone git@github.com:MRN-Code/coins-logon-widget.git
cd
into the repo’s directorynpm install
This project relies on Grunt to run tasks. (See its getting started guide for basic info.) Currently, three tasks exist:
grunt
: Build the project’s un-minified styles and scriptsgrunt build
: Build the project’s minified styles and scripts, suitable for production.grunt serve
: Spin up a connect server and rebuild the styles and scripts when they change. Useful for development on the project.grunt test
: Initializes a mock api server, and fires off in-browser testing in
multiple browsers in parallel.baseUrl
and authCookieName
FAQs
COINS Logon Widget. Injectable utility to manage browser authorization with COINS
We found that coins-logon-widget demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.