# basic-login-bar-spa

> Basic Bar with Title and Login buttons, Social Media Login incl. - No-Refresh Login Widget

Latest version **1.1.5** (published 2016-04-13) · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install basic-login-bar-spa
pnpm add basic-login-bar-spa
yarn add basic-login-bar-spa
bun add basic-login-bar-spa
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.5 |
| Published | 2016-04-13 |
| First published | 2016-03-07 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+18 in 2 direct dependencies) |
| Install scripts | no |
| Maintainers | vtange |

## Links

- npm: https://www.npmjs.com/package/basic-login-bar-spa
- npm.io page: https://npm.io/package/basic-login-bar-spa

## Dependencies (5)

- [async](https://npm.io/package/async.md) ^1.5.2
- [express](https://npm.io/package/express.md) ~4.0.0
- [nodemailer](https://npm.io/package/nodemailer.md) ^2.0.0
- [app-root-path](https://npm.io/package/app-root-path.md) ^1.0.0
- [connect-flash](https://npm.io/package/connect-flash.md) ~0.1.1

## Recent versions

- 1.1.5 (latest) — 2016-04-13
- 1.1.4 — 2016-04-13
- 1.1.3 — 2016-04-13
- 1.1.2 — 2016-04-13
- 1.1.1 — 2016-04-13
- 1.1.0 — 2016-04-13
- 1.0.9 — 2016-03-20
- 1.0.8 — 2016-03-20
- 1.0.5 — 2016-03-19
- 1.0.4 — 2016-03-09
- 1.0.3 — 2016-03-09
- 1.0.2 — 2016-03-08
- 1.0.0 — 2016-03-07

## README

# basic-login-bar-spa

No Refresh version of an EJS header template with login, signup, social media and forgot email functions

This module extends your Express app with routes and templates needed to quickly add login functionality to your app.

 - requires EJS and AngularJS ~1.4
 - requires you use Passport.JS and Express Session
 
 How to use:
 
 ```
 npm install --save basic-login-bar-spa
 ```
 In your server.js or app.js:
 ```
app.use(session({ secret: 'blah' }));
app.use(passport.initialize());
app.use(passport.session());
app.use(flash());

app.set('view engine', 'ejs'); 
app.use(express.static(__dirname + '/public'));
app.use('/users', express.static(__dirname + '/public'));

require('basic-login-bar')(app,session,passport);
 ```
 In your own templates
 ```
 	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.min.js"></script> <!-- load angular -->
	<script src="app.js"></script>
	...
<%- include ../node_modules/basic-login-bar/views/partials/header.ejs %>
 ```
  
 The .ejs partial for the header requires a 'title' property inputed from all your server routes. This autogenerates the title shown on the header. For example:
 
 ```
 		res.render('index.ejs', {
			title : app.title,
 ```
 You can define ```app.title``` in ```server.js/index.js``` or in ```package.json``` and require it.
 
 
 You can find example boilerplate code (most importantly the /public files needed for the page to function) for a project using this module at 
 https://github.com/vtange/Boilerplates/tree/master/site-w-logins-header-spa

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