open-index/open-npm huggingface dataset:
npm package: @revale/strapi-plugin-refresh-token
Description: Plugin for Strapi 5 to provide refresh token functionality.
Author: Rein Van Leirsberghe
Latest version: 0.0.11

# 
<h1 align="center">
  Strapi5 Refresh Token plugin
</h1>

Strapi Plugin that extends the local authorization functionality to provide Refresh tokens.

## ⚠️ Compatibility with Strapi versions

- This plugin relies on Strapi5 new `documentId`. It will not work with earlier versions!
- Works with `local` provider only.

## ⚙️ Installation

To install the Strapi Refresh Token Plugin, simply run one of the following command:

```
npm install @redon2inc/strapi-plugin-refresh-token
```

```
yarn add @redon2inc/strapi-plugin-refresh-token
```

## Config

You will need to set the following environment variables:
```
 PRODUCTION_URL=value # used for cookie security if enabled
 REFRESH_JWT_SECRET=string 
 ```

This component relies on extending the `user-permissions` types. Extend it by adding the following to `./src/extensions/user-permissions/content-types/user/schema.json`

```javascript
// .. rest of schema
attributes:{
  // .. rest of attributes
  "refresh_tokens": {
      "type": "relation",
      "relation": "oneToMany",
      "target": "plugin::refresh-token.token",
      "mappedBy": "user",
      "private": true,
      "configurable": false
    }
}
// rest of code
```

Modify your plugins file  `config/plugin.ts` to have the following:


```javascript

  // ..other plugins
  'users-permissions': {
        config: {
          jwt: {
            /* the following  parameter will be used to generate:
             - regular tokens with username and password
             - refreshed tokens when using the refreshToken API
            */
            expiresIn: '2h', // This value should be lower than the refreshTokenExpiresIn below.
          },
        },
    },
  'refresh-token': {
    config: {
      refreshTokenExpiresIn: '30d', // this value should be higher than the jwt.expiresIn
      requestRefreshOnAll: false, // automatically send a refresh token in all login requests.
      refreshTokenSecret: env('REFRESH_JWT_SECRET') || 'SomethingSecret',
      cookieResponse: false // if set to true, the refresh token will be sent in a cookie
    },
  }
```

## API Usage:

when calling `POST`:`/api/auth/local` include the `requestRefresh` parameter:

```json
{
  "identifier":"username",
  "password":"VerySecurePassword",
  "requestRefresh": true
}
```
The API will respond with the following:
```javascript
{
  "jwt":"token...",
  "user": { /* user object */ },
  "refreshToken": "RefreshToken..."
}
```

to request a new access token use the following: 
`POST`:`/api/auth/local/refresh` with the following payload:
```json
{
  "refreshToken": "RefreshToken...",
}
```
if the Refresh token is valid, the API will return
```json
{
  "jwt": "NewAccessToken..",
}
```

## TODO:
- Currently the tokens do not get removed from the DB on usage. They are cleaned when a new token is requested and the old ones have expired.
- Expose API so user can clear all sessions on their own.
npm package: @revall/graphql-auto-generating-cms
Description: This module will use your existed graphQL schema to generate simple for use CMS in a couple minutes!
Author: Sarkis Arutiunian
Latest version: 2.4.0

[![License](https://img.shields.io/npm/l/graphql-auto-generating-cms.svg)](https://www.npmjs.com/package/graphql-auto-generating-cms)
[![NPM](https://img.shields.io/npm/v/graphql-auto-generating-cms.svg)](https://www.npmjs.com/package/graphql-auto-generating-cms)
[![Build Status](https://travis-ci.org/sarkistlt/graphql-auto-generating-cms.svg?branch=master)](https://travis-ci.org/sarkistlt/graphql-auto-generating-cms)

![alt tag](https://github.com/sarkistlt/graphql-auto-generating-cms/blob/master/example/screenshots/Screen-Shot-2016-10-31-at-10.33.13-AM.png)
GraphQL CMS will build a fully-functional CMS by just using your printed GraphQL schema without any changes in your existed code or architecture.

**[Documentation](https://sarkistlt.gitbooks.io/graphql-cms/content/)**

**[Example which you can run with one command on your local machine](/example/)**

**[Online DEMO](http://cms-demo.web4fly.com/)** (db will be overwritten every 24h)

**[GraphQL API for DEMO](http://cms-demo.web4fly.com/graphql)**

[Auto generating CMS based on your GraphQL schema](https://medium.com/@sarkis.tlt/auto-generating-cms-based-on-your-graphql-schema-5eaa6b07987b#.7lk3gbz0b) [medium.com]

[GraphQL CMS v2 is ready to use](https://medium.com/@sarkis.tlt/graphql-cms-v2-is-ready-to-use-bceee835e489#.vsufwqrye) [medium.com]

### Install
~~~sh
npm i -S graphql-auto-generating-cms
~~~
~~~js
import GraphqlCMS from 'graphql-auto-generating-cms';
import 'graphql-auto-generating-cms/lib/styles.css';
...
~~~

**And to head of your template add:**

~~~sh
<link href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.1.8/semantic.css" rel="stylesheet">
~~~
npm package: @revall/react-markmirror
Description: React Markdown Editor
Author: Jed Watson
Latest version: 0.4.17

React Markmirror
==================
A WYSIWYG markdown editor for [React](http://facebook.github.io/react) which uses [CodeMirror](https://codemirror.net).

An demo is available at https://stories.headzoo.io/react-markmirror.

[![Build Status](https://img.shields.io/travis/headzoo/react-markmirror/master.svg?style=flat-square)](https://travis-ci.org/headzoo/react-markmirror)
[![NPM Downloads](https://img.shields.io/npm/dm/react-markmirror.svg?style=flat-square)](https://www.npmjs.com/package/react-markmirror)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://raw.githubusercontent.com/headzoo/react-markmirror/master/LICENSE)

* [Features](#features)
* [Installation](#installation)
* [Example](#example)
* [Props](docs/props.md)
* [Methods](docs/methods.md)
* [Themes](docs/themes.md)
* [Styling](docs/styling.md)
* [Button Customizing](docs/button.md)
* [Toolbar Customizing](docs/toolbar.md)
* [Dropping and Uploading Files](docs/uploading.md)
* [Custom Prompt](docs/prompt.md)
* [Previewing](docs/preview.md)
* [Internationalization (i18n)](docs/i18n.md)
* [Storybook](docs/storybook.md)

## Features

![Standard screenshot](docs/images/theme-dark.png)

* Themes
* Syntax highlighting
* Customizable toolbar, buttons, and prompts
* Drag and drop file uploading
* Internationalization (i18n)

## Installation
The module is installed using npm, and sets 'react' and 'prop-types' as peer dependencies. Meaning they must be installed separately.

```
npm install react-markmirror react prop-types --save
```


## Example

```js
import React from 'react';
import ReactDOM from 'react-dom';
import Markmirror from 'react-markmirror';

class App extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      code: ''
    };
  }

  handleChange = (code) => {
    this.setState({ code });
  };

  render() {
    return (
      <Markmirror
        value={this.state.code}
        onChange={this.handleChange}
      />
    );
  }
}

ReactDOM.render(<App />, document.getElementById('app'));
```