# loopback-stormpath

> Stormpath integration for Loopback.

Latest version **0.0.1** (published 2015-03-28) · Apache license · 0 weekly downloads

## Install

```sh
npm install loopback-stormpath
pnpm add loopback-stormpath
yarn add loopback-stormpath
bun add loopback-stormpath
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2015-03-28 |
| First published | 2015-03-28 |
| Weekly downloads | 0 |
| License | Apache |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Stormpath, Inc. |
| Maintainers | rdegges |
| Keywords | stormpath, loopback, strongloop, user, security, authentication |

## Links

- npm: https://www.npmjs.com/package/loopback-stormpath
- Repository: https://github.com/stormpath/loopback-stormpath
- Issues: https://github.com/stormpath/loopback-stormpath/issues
- npm.io page: https://npm.io/package/loopback-stormpath

## Dependencies (7)

- [async](https://npm.io/package/async.md) ^0.9.0
- [debug](https://npm.io/package/debug.md) ^2.1.2
- [loopback](https://npm.io/package/loopback.md) ^2.14.0
- [stormpath](https://npm.io/package/stormpath.md) ^0.9.2
- [loopback-connector](https://npm.io/package/loopback-connector.md) ^1.2.1
- [loopback-datasource-juggler](https://npm.io/package/loopback-datasource-juggler.md) ^2.21.0
- [loopback-connector-stormpath](https://npm.io/package/loopback-connector-stormpath.md) latest

## Alternatives

- [@clerk/clerk-expo](https://npm.io/package/@clerk/clerk-expo.md) — 133.6K weekly downloads
- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2015-03-28

## README

# loopback-stormpath

[![NPM Version](https://img.shields.io/npm/v/loopback-stormpath.svg?style=flat)](https://npmjs.org/package/loopback-stormpath)
[![NPM Downloads](http://img.shields.io/npm/dm/loopback-stormpath.svg?style=flat)](https://npmjs.org/package/loopback-stormpath)
[![Build Status](https://img.shields.io/travis/stormpath/loopback-stormpath.svg?style=flat)](https://travis-ci.org/stormpath/loopback-stormpath)

*Stormpath User Management for Loopback.*


## Purpose

This library is meant to provide an interface between [Loopback][] and
[Stormpath][].

The end goal is provide the best possible user management system of all time for
Loopback developers!

If you don't already have a Stormpath account, go make one!
https://stormpath.com


## Usage

To get started, you'll need to have Strongloop installed:

```console
$ npm install -g strongloop
```

Next, you need to create a Loopback project to work in:

```console
$ slc loopback
```

Go through the questions to create your project.

Next, go into your project directory and edit your `server/server.js` file.
You'll need to add the following import statement to the top of your file:

```javascript
var stormpath = require('loopback-stormpath');
```

You'll also need to add the following line of code below your app creation
stuff.  You should have something like this:

```javascript
var app = module.exports = loopback();

// Initialize Stormpath.
stormpath.init(app);
```

After that, go ahead and open up `server/model-config.json`, and do two things:

- Firstly, remove the `User` object.  This is the default Loopback User model
  which you won't be using.
- Secondly, add in a `StormpathUser` object like this:

```javascript
"StormpathUser": {
  "dataSource": "stormpath"
}
```

`StormpathUser` is the new user model you'll be using from now on.

Next, open up `server/datasources.json`.  Here you'll need to define your
Stormpath data source, and specify your Stormpath API credentials.  Use the
following JSON blob as a configuration example, but substitute in your own
credentials:

```javascript
"stormpath": {
  "name": "stormpath",
  "connector": "stormpath",
  "apiKeyId": "xxx",
  "apiKeySecret": "xxx",
  "applicationHref": "https://api.stormpath.com/v1/applications/xxx"
}
```

That's it!  You've now fully configured your Loopback project to work with
Stormpath.  If you run your project (`$ slc run`), then visit the API explorer:
http://localhost:3000/explorer -- you should see a `StormpathUser` API endpoint
that you can use to create and manage your users with Stormpath!

**NOTE**: This is a VERY early release.  We're still working hard to improve
things, and make this feature complete!  If you have feedback, please send it to
us: support@stormpath.com


## Changelog

All library changes, in descending order.


### Version 0.0.1

**Released on March 27, 2015.**

- First release ever!  Still some lacking features, but we'll ship it anyway!


  [Stormpath]: https://stormpath.com/ "Stormpath User Management"
  [Loopback]: http://loopback.io/ "Loopback Node.js Web Framework"

---
_Source: https://npm.io/package/loopback-stormpath · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
