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

secured

v0.0.12

Published

Secured tag requires authentication to be passed to show its content

Downloads

9

Readme

Authentication module with redux and Material-UI default login forms

91 downloads in one day. wow :)

uploaded it here to make it easier to distribute

Supported authentication providers

Spring Boot

  • /api/authenticate endpoint
  • jwt authentication. response from server is parsed for id_token key in the root of json

Supported boilerplate

This module is writed for https://github.com/react-boilerplate/react-boilerplate boilerplate

But nothing stops to use it in any another boilerplate. Just keep in mind that, if your application uses Redux to manage the state, then you need to inject Secured Redux Store into Your Redux Store. react-boilerplate have function for this in utils/injectReducer and utils/injectSaga.

How to use

import Secured from 'secured';

or Secured = require('secured);

or whatever you like to import javascript module

Wrap your secured content in <Secured>...</Secured> tag and hope that it works :D

Authentication goes to http://localhost:8080/. This is default Spring Boot application development port.

TODO

  • add authentication_url parameter
  • add api for reducer and saga injectors
  • detect if already wrapped in MuiProvider (Material-UI specific support feature)
  • parametrized way to deal by default. 1) redirect to login page; 2) login form in popup dialog; 3) login form right inside <Secured> block
  • real examples
  • publish on github :D
  • documentation about how to override default actions
  • documentation about how to use use built in LoginForm/LoginPage on your own route path. How to override final actions and so
  • update diagrams to explaining asynchrony in processes inside the module
  • add support for different authentication providers
  • add support for authirization (different authorizatoin providers?)

Activity diagrams

helps me to understands declarative code

<Secured />

need to figure out how to show pictures on NPM www page. check GitHub repo to see those pictures ;)

Secured

<Logout />

check GitHub repo to see diagram picture

Secured