Skip to content
A parse nuxtjs plugin
JavaScript Vue HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.github
.nuxt wip Jul 16, 2019
lib
test
.gitignore gitignore Jul 16, 2019
.prettierignore
.prettierrc
CODE_OF_CONDUCT.md Added contribution guide Jul 17, 2019
CONTRIBUTING.md
README.md
package-lock.json
package.json 0.1.3 Jul 17, 2019
yarn.lock

README.md

nuxt-parse

CircleCI Cierra GitHub license

A parse module for Nuxt.js.

Installation

$ yarn add nuxt-parse # or npm install

Implement the module in nuxt.config.js:

...
modules: [
    ['nuxt-parse', {
            appID: YOUR_APP_ID,
            javascriptKey: YOUR_JAVASCRIPT_KEY,
            serverUrl: OPTIONAL_SERVER_URL
        }
    ]
  ],
...

You don't have to provide the serverUrl if you're using the back4app service.

Usage

To access the parse instance you can use this.$parse anywhere you want to. For example to login you can use:

this.$parse.User.logIn('username', 'password')

Middleware

To add the middleware to the client you can create a file called middleware/auth.js with the following content:

import Parse from 'parse';
export default function ({redirect}) {
    // If the user is not authenticated
    let currentUser = Parse.User.current();
    if(!currentUser)
        return redirect('/register');
  }

Then you're able to use the middleware: 'auth' option in your pages.

Contributing

Please observe and respect all aspects of the included Code of Conduct https://github.com/cierrateam/nuxt-parse/blob/master/CODE_OF_CONDUCT.md.

Submitting Pull Requests

Please review the Contribution Guidelines https://github.com/cierrateam/nuxt-parse/blob/master/CONTRIBUTING.md. Only PRs that meet all criterium will be accepted.

You can’t perform that action at this time.