# vue-steemconnect

> SteemConnect plugin for Vue.js

Latest version **0.4.1** (published 2019-06-08) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install vue-steemconnect
pnpm add vue-steemconnect
yarn add vue-steemconnect
bun add vue-steemconnect
```

## 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.4.1 |
| Published | 2019-06-08 |
| First published | 2018-07-03 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 41.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | mkt |
| Maintainers | mktatnpm |
| Keywords | steemconnect, sc2, vue, plugin |

## Links

- npm: https://www.npmjs.com/package/vue-steemconnect
- Repository: https://github.com/mktcode/vue-steemconnect
- Homepage: https://github.com/mktcode/vue-steemconnect#readme
- Issues: https://github.com/mktcode/vue-steemconnect/issues
- npm.io page: https://npm.io/package/vue-steemconnect

## Dependencies (1)

- [steemconnect](https://npm.io/package/steemconnect.md) ^3.0.0

## Recent versions

- 0.4.1 (latest) — 2019-06-08
- 0.4.0 — 2019-06-08
- 0.3.1 — 2018-09-24
- 0.3.0 — 2018-09-24
- 0.2.4 — 2018-09-19
- 0.2.3 — 2018-08-30
- 0.2.2 — 2018-08-10
- 0.2.1 — 2018-08-10
- 0.2.0 — 2018-08-10
- 0.1.0 — 2018-08-10
- 0.0.4 — 2018-07-11
- 0.0.3 — 2018-07-11
- 0.0.2 — 2018-07-03
- 0.0.1 — 2018-07-03

## README

# VueSteemConnect

This plugin provides a very simple way to integrate Steemconnect in your Vue.js project. It also provides a Vuex module to handle the user object and login/logout.

```
npm i --save vue-steemconnect
```

```
import Vue from 'vue'
import VueSteemConnect from 'vue-steemconnect'

Vue.use(VueSteemConnect, {
  app: 'appname',
  callbackURL: 'http://localhost:3000'
  scope: ['vote', 'comment']
})

Vue.SteemConnect.getLoginURL()
Vue.SteemConnect.vote(...)
Vue.SteemConnect.comment(...)
```

```
// in component
this.$steemconnect.getLoginURL()
this.$steemconnect.vote(...)
this.$steemconnect.comment(...)
...
```

## Store Module

If you're using Vuex, this plugin provides a module to handle login and logout.

```
import Vue from 'vue'

const store = new Vuex.Store({
  state: {
    ...
  },
  modules: {
    steemconnect: Vue.SteemConnectStore
  }
})
```

Now you can access the user object like this:

```
// in component
this.$store.state.steemconnect.user

// or if you want to use the mapGetters helper
computed: {
  ...mapGetters('steemconnect', ['user'])
} 
```

To login/logout use:
```
this.$store.dispatch('steemconnect/login')
this.$store.dispatch('steemconnect/logout')
```

#### Nuxt.js

*~/plugins/vue-steemconnect.js:*

```
import Vue from 'vue'
import VueSteemConnect from 'vue-steemconnect'

Vue.use(VueSteemConnect, {
  app: 'mkt.test',
  callbackURL: 'http://localhost:3000/auth',
  scope: ['vote', 'comment']
})
```

*~/nuxt.config.js*

```
plugins: [
  '~/plugins/vue-steemconnect'
],
```

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