Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Admin-Ui-Extensions Not Found (404) - Authenticate Requests Between An Extension And Backend Server #386

Open
den232 opened this issue Sep 24, 2023 · 0 comments

Comments

@den232
Copy link

den232 commented Sep 24, 2023

Hello, I'm attempting to authenticate requests between an extension and an app's backend server, but running into a brick wall ...

Instructions here: https://shopify.dev/docs/api/admin-extensions#app-authentication

My test page is exactly like the example, the straight javascript version,

(except that I had to add a "/" in the import '/@shopify/admin-ui-extensions' instead of '@shopify/admin-ui-extensions')

I did a npm install of this, and can see stuff that was installed.

`import {extend, TextField} from '/@shopify/admin-ui-extensions';

async function eRunTest(argObject) {

function MyExtension(root, api) {
	const sessionToken = api.sessionToken;

	const text = root.createComponent(TextField, {
		disabled: true,
		value: '',
		label: 'Session Token',
	});

	sessionToken.getSessionToken().then((newToken) => {
		text.updateProps({
			value: newToken,
		});
	});

	root.appendChild(text);
	root.mount();
}

extend('MyExtensionPoint', MyExtension); }

`
But I get the error

https://cdn.shopify.com/@shopify/admin-ui-extensions net::ERR_ABORTED 404 (Not Found)

I did a npm install of this, and can see stuff that was installed.

Any suggestions? Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant