Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
feat(BaseConfig): copied over current sahat/satellizer settings
Browse files Browse the repository at this point in the history
  • Loading branch information
doktordirk committed May 20, 2016
1 parent 69a27fa commit 70dfb81
Showing 1 changed file with 81 additions and 82 deletions.
163 changes: 81 additions & 82 deletions src/baseConfig.js
Expand Up @@ -128,122 +128,121 @@ export class BaseConfig {
//OAuth provider specific related configuration
// ============================================
providers = {
facebook: {
name: 'facebook',
url: '/auth/facebook',
authorizationEndpoint: 'https://www.facebook.com/v2.5/dialog/oauth',
redirectUri: window.location.origin + '/',
requiredUrlParams: ['display', 'scope'],
scope: ['email'],
scopeDelimiter: ',',
display: 'popup',
oauthType: '2.0',
popupOptions: { width: 580, height: 400 }
},
google: {
name: 'google',
url: '/auth/google',
authorizationEndpoint: 'https://accounts.google.com/o/oauth2/auth',
redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host,
redirectUri: window.location.origin,
requiredUrlParams: ['scope'],
optionalUrlParams: ['display', 'state'],
scope: ['profile', 'email'],
scopePrefix: 'openid',
scopeDelimiter: ' ',
requiredUrlParams: ['scope'],
optionalUrlParams: ['display'],
display: 'popup',
type: '2.0',
popupOptions: {
width: 452,
height: 633
oauthType: '2.0',
popupOptions: { width: 452, height: 633 },
state: function() {
var rand = Math.random().toString(36).substr(2);
return encodeURIComponent(rand);
}
},
facebook: {
name: 'facebook',
url: '/auth/facebook',
authorizationEndpoint: 'https://www.facebook.com/v2.3/dialog/oauth',
redirectUri: window.location.origin + '/' || window.location.protocol + '//' + window.location.host + '/',
scope: ['email'],
scopeDelimiter: ',',
nonce: function() {
return Math.random();
},
requiredUrlParams: ['nonce', 'display', 'scope'],
display: 'popup',
type: '2.0',
popupOptions: {
width: 580,
height: 400
}
github: {
name: 'github',
url: '/auth/github',
authorizationEndpoint: 'https://github.com/login/oauth/authorize',
redirectUri: window.location.origin,
optionalUrlParams: ['scope'],
scope: ['user:email'],
scopeDelimiter: ' ',
oauthType: '2.0',
popupOptions: { width: 1020, height: 618 }
},
instagram: {
name: 'instagram',
url: '/auth/instagram',
authorizationEndpoint: 'https://api.instagram.com/oauth/authorize',
redirectUri: window.location.origin,
requiredUrlParams: ['scope'],
scope: ['basic'],
scopeDelimiter: '+',
oauthType: '2.0'
},
linkedin: {
name: 'linkedin',
url: '/auth/linkedin',
authorizationEndpoint: 'https://www.linkedin.com/uas/oauth2/authorization',
redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host,
redirectUri: window.location.origin,
requiredUrlParams: ['state'],
scope: ['r_emailaddress'],
scopeDelimiter: ' ',
state: 'STATE',
type: '2.0',
popupOptions: {
width: 527,
height: 582
}
},
github: {
name: 'github',
url: '/auth/github',
authorizationEndpoint: 'https://github.com/login/oauth/authorize',
redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host,
optionalUrlParams: ['scope'],
scope: ['user:email'],
scopeDelimiter: ' ',
type: '2.0',
popupOptions: {
width: 1020,
height: 618
}
},
yahoo: {
name: 'yahoo',
url: '/auth/yahoo',
authorizationEndpoint: 'https://api.login.yahoo.com/oauth2/request_auth',
redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host,
scope: [],
scopeDelimiter: ',',
type: '2.0',
popupOptions: {
width: 559,
height: 519
}
oauthType: '2.0',
popupOptions: { width: 527, height: 582 }
},
twitter: {
name: 'twitter',
url: '/auth/twitter',
authorizationEndpoint: 'https://api.twitter.com/oauth/authenticate',
type: '1.0',
popupOptions: {
width: 495,
height: 645
}
redirectUri: window.location.origin,
oauthType: '1.0',
popupOptions: { width: 495, height: 645 }
},
twitch: {
name: 'twitch',
url: '/auth/twitch',
authorizationEndpoint: 'https://api.twitch.tv/kraken/oauth2/authorize',
redirectUri: window.location.origin,
requiredUrlParams: ['scope'],
scope: ['user_read'],
scopeDelimiter: ' ',
display: 'popup',
oauthType: '2.0',
popupOptions: { width: 500, height: 560 }
},
live: {
name: 'live',
url: '/auth/live',
authorizationEndpoint: 'https://login.live.com/oauth20_authorize.srf',
redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host,
redirectUri: window.location.origin,
requiredUrlParams: ['display', 'scope'],
scope: ['wl.emails'],
scopeDelimiter: ' ',
requiredUrlParams: ['display', 'scope'],
display: 'popup',
type: '2.0',
popupOptions: {
width: 500,
height: 560
}
oauthType: '2.0',
popupOptions: { width: 500, height: 560 }
},
instagram: {
name: 'instagram',
url: '/auth/instagram',
authorizationEndpoint: 'https://api.instagram.com/oauth/authorize',
redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host,
yahoo: {
name: 'yahoo',
url: '/auth/yahoo',
authorizationEndpoint: 'https://api.login.yahoo.com/oauth2/request_auth',
redirectUri: window.location.origin,
scope: [],
scopeDelimiter: ',',
oauthType: '2.0',
popupOptions: { width: 559, height: 519 }
},
bitbucket: {
name: 'bitbucket',
url: '/auth/bitbucket',
authorizationEndpoint: 'https://bitbucket.org/site/oauth2/authorize',
redirectUri: window.location.origin + '/',
requiredUrlParams: ['scope'],
scope: ['basic'],
scopeDelimiter: '+',
display: 'popup',
type: '2.0',
popupOptions: {
width: 550,
height: 369
}
scope: ['email'],
scopeDelimiter: ' ',
oauthType: '2.0',
popupOptions: { width: 1028, height: 529 }
}
};

Expand Down

0 comments on commit 70dfb81

Please sign in to comment.