Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Aug 16, 2019. It is now read-only.
/vuepress-passPublic archive

VuePress authentication plugin

License

NotificationsYou must be signed in to change notification settings

InCuca/vuepress-pass

Repository files navigation

Travis

VuePress oAuth2 - Implicity Grant plugin

Another options (behind a proxy server):Pomerium,Okta,vuepress-pomerium

Usage

npm i --save InCuca/vuepress-pass

.vuepress/config.js:

constPass=require('vuepress-pass');module.exports={plugins:[[Pass,{url:'https://foo.bar/oauth',redirectUri:'https://foo.bar/callback',clientId:'foobar',authenticated(redirectQuery,redirect){redirect('/');},// optionalunauthenticated(authQuery,redirect){redirect(authQuery);},// optionalsetState(state){localStorage.setItem('auth',state);},// optionalgetState(){returnlocalStorage.getItem('auth');},// optional}],]};
  • authenticated is called when user comes back from provider authentication
  • unauthenticated is called when user need's authentication on provide and will redirect (through redirect function)

more details


[8]ページ先頭

©2009-2025 Movatter.jp