🐛 fix oAuth login for blog urls which contain /ghost
(#429)
no issue - use the configured `blogUrl` value rather than using `window.location.href` with a poor regex that was incorrectly matching on domains containing multiple `/ghost` parts such as `http://ghost.local:2368/ghost`
This commit is contained in:
parent
413ea7de18
commit
106be90416
@ -19,7 +19,10 @@ let GhostOauth2 = Oauth2.extend({
|
||||
responseParams: ['code'],
|
||||
|
||||
// we want to redirect to the ghost admin app by default
|
||||
redirectUri: window.location.href.replace(/(\/ghost)(.*)/, '$1/'),
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
this.set('redirectUri', `${this.get('config.blogUrl')}/ghost/`);
|
||||
},
|
||||
|
||||
open(options) {
|
||||
if (options.type) {
|
||||
|
Loading…
Reference in New Issue
Block a user