asteroid-oauth-mixin
An OAuth mixin for Asteroid.
Install
In node
Download the package:
npm install asteroid-oauth-mixin
Example usage
;; const Asteroid = ; const asteroid = platform endpoint; /** You need to define a `getServiceConfig` method (either in a mixin or on the* instance itself) which returns a plain object containing the configuration* for the specified provider. Such configurations are stored in the* `meteor_accounts_loginServiceConfiguration` collection, which the oauth* mixin automatically retrieves by subscribing to* `meteor.loginServiceConfiguration`, a subscription published - by default -* by the meteor server.* A naive implementation could be the following:*/asteroidddp;asteroid { return thisloginServiceConfigurationproviderName;} /** Somewhere in your code*/ asteroid
If you use asteroid-collections-mixin:
;;; const Asteroid = ; const asteroid = platform endpoint; /** Somewhere in your code*/ asteroid