new WixAppStrategy(options, verify) → {WixAppStrategy}
WixAppStrategy
constructor.
- Source:
- See:
WixAppStrategy
constructor.
The authentication strategy authenticates requests based on the
instance
query param, sent by WIX Applications
Example
passport.use(new LocalStrategy({secret: 'your-wix-secret'},
function verifyCallback(instance, done) {
WixApp.findOne({ appId: instance.instanceId }, function (err, wixapp) {
done(err, wixapp);
});
}
));
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | Options for strategy Properties
|
||||||||||||||||||||
verify |
function | Verification callback |
Returns:
WixAppStrategy instance .
- Type
- WixAppStrategy
Methods
(package) authenticate(req)
Authenticate request based on the contents of a Wix query-parameters.
Authenticate request based on the contents of a Wix query-parameters.
Parameters:
Name | Type | Description |
---|---|---|
req |
Object |