Token-based AngularJS Authentication
Satellizer is a simple to use, end-to-end, token-based authentication module for AngularJS with built-in support for Google, Facebook, LinkedIn, Twitter, Instagram, GitHub, Bitbucket, Yahoo, Twitch, Microsoft (Windows Live) OAuth providers, as well as Email and Password sign-in. However, you are not limited to the sign-in options above, in fact you can add any OAuth 1.0 or OAuth 2.0 provider by passing provider-specific information in the app config block.
Support us with a monthly donation and help us continue our activities. [Become a backer]
Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]
<script src="angular.js"></script>
<script src="satellizer.js"></script>
<script src="https://cdn.jsdelivr.net/satellizer/0.15.5/satellizer.min.js"></script>$ npm install satellizer$ bower install satellizerWith any Cordova mobile apps or any framework that uses Cordova, such as Ionic Framework, you will need to add cordova-plugin-inappbrowser plugin:
$ cordova plugin add cordova-plugin-inappbrowserMake sure that inAppBrowser is listed in your project:
$ cordova plugins
cordova-plugin-console 1.0.2 "Console"
cordova-plugin-device 1.1.1 "Device"
cordova-plugin-inappbrowser 1.3.0 "InAppBrowser"
cordova-plugin-splashscreen 3.2.0 "Splashscreen"
cordova-plugin-statusbar 2.1.1 "StatusBar"
cordova-plugin-whitelist 1.2.1 "Whitelist"
ionic-plugin-keyboard 1.0.8 "Keyboard"Step 1. App Module
…Step 2. Controller
angular.module('MyApp')
.controller('LoginCtrl', function($scope, $auth) {
$scope.authenticate = function(provider) {
$auth.authenticate(provider);
};
});Step 3. Template
…Note: For server-side usage please refer to the examples directory.
Below is a complete listing of all default configuration options.
…| 9+ | ✓ | ✓ | ✓ | ✓ | ✓ |
Satellizer relies on token-based authentication using JSON Web Tokens instead of cookies.
Additionally, authorization (obtaining user's information with their permission) and authentication (application sign-in) requires sever-side implementation. See provided examples implemented in multiple languages for your convenience. In other words, you cannot just launch your AngularJS application and expect everything to work. The only exception is when you use OAuth 2.0 Implicit Grant (client-side) authorization by setting responseType: 'token' in provider's configuration.
$auth.login() with email and password.POST request to /auth/login.401.401.$auth.authenticate('provider name').request_token.request_tokenfor the authorization popup.authorizationEndpoint with a valid request_token query parameter, as well as popup options for height and width. This will redirect a user to the authorization screen. After this point, the flow is very similar to OAuth 2.0.oauth_token and oauth_verifier query parameters.POST request to the /access_token URL since we now have oauth_token and
oauth_verifier parameters.$auth.authenticate('provider name').code (authorization code)
query string parameter.code parameter is sent back to the parent wpopup not closing at /callback url
TiktTok Login compatibility using satellizer
redirect_uri Error on Anroid Devices using Satellizer/Angularjs/Cordova
When I load my website the word "#hello" comes first Opencart website
LinkedIn scope parameter problem
Instagram Redirect URI Issue on Cordova
window.open blocked in Facebook/Messenger in-app browser
Regarding callbackurl for twitter
Facebook:Missing Authorization code - Laravel + AngularJS
facebook auth no longer working - Can't load URL