swagger-magic-social-auth-interface

social auth interface for the swagger-magic module

Usage no npm install needed!

<script type="module">
  import swaggerMagicSocialAuthInterface from 'https://cdn.skypack.dev/swagger-magic-social-auth-interface';
</script>

README

Install

npm install swagger-magic-social-auth-interface --save

swagger-magic-social-auth-interface

social auth interface for the swagger-magic module

Example

    var socialAuth = require("swagger-magic-social-auth-interface");

Members

socialAuth~authenticate

authenticate the user logged in from social service

Params

  • user Object - the user to authenticate
  • (Function(err,user)) - done - the callback to call when result ready

Scope: inner member of swagger-magic-social-auth-interface
Example

    socialAuth.authenticate(user, done)

socialAuth~providers

object of used providers' details every key is the service name and the value is the details. contains of clientID, clientSecret and callbackURL

Scope: inner member of swagger-magic-social-auth-interface
Example

 providers: {
    facebook: {
        clientID: 'id',
        clientSecret: 'secret',
        callbackURL: 'url'
    },
    google: {
        clientID: 'id',
        clientSecret: 'secret',
        callbackURL: 'url'
    }
}