0.4.3 • Published 10 months ago

@schibsted/niche-schibsted-account v0.4.3

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
10 months ago

niche-schibsted-account

This package is a wrapper around @schibsted/account-sdk-browser that makes it easier to use for Niche team.

What are additional things it does in coparison to SDK?

  • override logout function to allow passing redirectUrl (window.location.href by default) to it.
  • assigns instance if SDK to window.Identity - it is used like that by core comments.
  • sends events for initialization and user change
  • runs simplified login logic
  • runs auto-login logic

Local development

First install dependencies clone repository, open terminal and run.

npm ci

Next start transpiling the source code:

npm run dev

Linking

Note: order of command execution is important.

In order to make your project available as package locally:

npm link

And in project you need:

npm link @schibsted/niche-schibsted-account

Since library has react as peer dependency you need to make sure to pass react manually to the library if you want to use linked version. The easiest way to do so is to declare react as a webpack alias, e.g.

config.resolve.alias.react = path.resolve('./node_modules/react');

If the project you use this package in, does not have webpack, you can try https://benjaminwfox.com/blog/tech/why-isnt-npm-link-working#if-you-use-react.

And now you are all good. Your project will now use the local version of niche-schibsted-account instead of the one in node_modules.

0.3.0

12 months ago

0.4.1

11 months ago

0.4.0

12 months ago

0.3.1

12 months ago

0.4.3

10 months ago

0.4.2

10 months ago

0.2.1

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.0

2 years ago

0.1.16

2 years ago

0.1.15

2 years ago

0.1.14

2 years ago

0.1.13

2 years ago

0.1.12

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago