Update authentication endpoint for subdirectory

Fixes bug where user is unable to log into admin when subdirectory is specified
This commit is contained in:
Justin Yek 2014-08-10 22:48:11 +08:00 committed by jyek
parent 957b1566de
commit 8393ba727b

View File

@ -1,3 +1,7 @@
import ghostPaths from 'ghost/utils/ghost-paths';
var Ghost = ghostPaths();
var AuthenticationInitializer = {
name: 'authentication',
@ -17,7 +21,7 @@ var AuthenticationInitializer = {
}.property()
});
SimpleAuth.Authenticators.OAuth2.reopen({
serverTokenEndpoint: '/ghost/api/v0.1/authentication/token',
serverTokenEndpoint: Ghost.apiRoot + '/authentication/token',
refreshAccessTokens: true,
makeRequest: function (url, data) {
data.client_id = 'ghost-admin';