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

asireact-greanid

v1.0.9

Published

This react component from [Asitis AB](https://asitis.se) provides a convinient way to create links to https://grean.com/easyid endpoints for nordic bank id providers

Downloads

4

Readme

asireact-greanid

This react component from Asitis AB provides a convinient way to create links to https://grean.com/easyid endpoints for nordic bank id providers

NOTE: You need an account and a service agreement with Grean to use their service. Visit grean.com to review their offer. The publisher of this component is in no way affiliated with Grean.


Installation

Execute one of the following commands in powershell

  # Yarn users
  yarn add asireact-greanid

  # NPM users
  npm install --save asireact-greanid

Usage

To use the component, In your react Application import the BankId component, the configuration object and the service provider list.


import {BankId,BankIdConfig,IdProviderServices } from 'asireact-greanid'

The following configurations must be provided:

  let config = BankIdConfig;
  config.authority = 'https://mydomain.grean.id'; // The domain registered with Grean
  config.clientId = 'urn:my.client.id:3550'; // The client id provided by Grean when an application is registered
  config.idProviderService = IdProviderServices.SEBankIDSameDevice; // A provider service from the list

The following configurations are optional

    config.redirectProtocol = "https"; // Defaults to current protocol
    config.redirectHostName = "my.service.host"; // Defaults to current host
    config.redirectPort = "1234"; // Defaults to current port (if used)
    config.redirectPage = 'mycallback';  // Defaults to 'callback'

    // This configuration will result in a callback with the id token from Grean to 
    // https://my.service.host:1234/mycallback 

The BankId component is used with the configuration like this

    <BankId {...config}>
      Logg in with bank id
    </BankId>

Or with an optional style object

    <BankId {...config} style={{ background: this.props.color }}>
      Logg in with bank id
    </BankId>

Or with a regular className

    <BankId {...config} className="btn">
      Logg in with bank id
    </BankId>

It is also possible to send along a SSN and/or a phone number to the component. This will be included in the scope of the request to Grean EasyId. This makes it possible to eliminate the form page asking for SSN on the provider site. The phone property is only useful when targeting Norwegian Mobile BankId.

    <BankId {...config} ssn="1234567890" phone='123456789' >
      Logg in with bank id
    </BankId>