Auth Adapters refactoring (#3177)
* Moves all authentication providers to Adapter/Auth * refactors specs * Deprecates oauth option in favor of auth option - Deprecates facebookAppIds option (in favor of auth.facebook.appIds) - Adds warnings about the deprecated options * nits
This commit is contained in:
committed by
Arthur Cinader
parent
a9067260fc
commit
c1dcaf1271
12
spec/support/CustomAuth.js
Normal file
12
spec/support/CustomAuth.js
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
module.exports = {
|
||||
validateAppId: function() {
|
||||
return Promise.resolve();
|
||||
},
|
||||
validateAuthData: function(authData) {
|
||||
if (authData.token == 'my-token') {
|
||||
return Promise.resolve();
|
||||
}
|
||||
return Promise.reject();
|
||||
}
|
||||
}
|
||||
14
spec/support/CustomAuthFunction.js
Normal file
14
spec/support/CustomAuthFunction.js
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
module.exports = function(validAuthData) {
|
||||
return {
|
||||
validateAppId: function() {
|
||||
return Promise.resolve();
|
||||
},
|
||||
validateAuthData: function(authData) {
|
||||
if (authData.token == validAuthData.token) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
return Promise.reject();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user