Passport strategy for authentication with Frontier Store through the OAuth 2.0 API.
The official docs page found here details how OAuth2 is set up for Frontier. (Requires Frontier account to access)
npm install passport-frontier --save
The Frontier authentication strategy authenticates users via a Frontier Store user account and OAuth 2.0 token(s). A Frontier API client ID, secret and redirect URL must be supplied when using this strategy. The strategy also requires a
verify callback, which receives the access token and an optional refresh token, as well as a
profile which contains the authenticated Frontier user's profile. The
verify callback must also call
cb providing a user to complete the authentication.
let FrontierStrategy = Strategy;let scopes = 'auth' 'capi';passport;
passport.authenticate(), and specify the
'frontier' strategy to authenticate requests.
For example, as a route middleware in an Express app:
An Express server example can be found in the
/example directory. Be sure to
npm install in that directory to get the dependencies.
Licensed under the Apache License 2.0.