Cannot generate tokens for authentication between extension and backend - yikes!

Cannot generate tokens for authentication between extension and backend - yikes!

den232
Shopify Partner
223 8 57

Hi.

 

I am confused!  I am trying to generate and use access/session tokens for authorization of communications between my theme extension and backend, but coming up short in a few ways.  Pls ... what am I doing wrong or ??

 

Problem #1.

 

Running on my development server, I installed via npm the @Shopify/admin-ui-extensions.   But when I attempt to import it into my extension js code, I keep getting failed references to the shopify CDN at https://cdn.shopify.com/extensions/node_modules/@shopify/admin-ui-extensions ...

I have tried all sorts of locations in the install line, none seem to work

 

 import ... from '@shopify/admin-ui-extensions'  =>  Relative references must start with either "/", "./", or "../".
import {extend, TextField, Button} from '../../../@shopify/admin-ui-extensions'; 
import {extend, TextField, Button} from '../../../node_modules/@shopify/admin-ui-extensions';
import {extend, TextField, Button} from '/@shopify/admin-ui-extensions' 
import { extend, TextField, Button } from '/node_modules/@shopify/admin-ui-extensions';
 
----------------------
 
Problem 2.
 
The documentation seems to be telling me that I cannot use this in production anyway.  What should I use instead to get/use tokens?
 
Admin UI block extensions are currently in developer preview. You can only render them while developing locally on a development store.
 
Thanks and best regards, jb
 
Replies 0 (0)