mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Updated URL and response handling for identity token
no-issue This just keeps the admin in line with the changes made in https://github.com/TryGhost/Ghost/pull/11559/files
This commit is contained in:
parent
6cc70f8918
commit
da3f92fac4
1 changed files with 3 additions and 2 deletions
|
@ -13,9 +13,10 @@ export default Component.extend({
|
|||
let iframe = this.element.querySelector('#billing-frame');
|
||||
window.addEventListener('message', (event) => {
|
||||
if (event && event.data && event.data.request === 'token') {
|
||||
const ghostIdentityUrl = this.get('ghostPaths.url').api('ghost-identity');
|
||||
const ghostIdentityUrl = this.get('ghostPaths.url').api('identities');
|
||||
|
||||
this.ajax.post(ghostIdentityUrl).then(({token}) => {
|
||||
this.ajax.request(ghostIdentityUrl).then((response) => {
|
||||
const token = response && response.identities && response.identities[0] && response.identities[0].token;
|
||||
iframe.contentWindow.postMessage({
|
||||
request: 'token',
|
||||
response: token
|
||||
|
|
Loading…
Add table
Reference in a new issue