Constructs the redirection URL for getEmbeddedAppUrl based on the given host
.
This utility relies on the host query param being a Base 64 encoded string. All requests from Shopify should include this param in the correct format.
app.get('/redirect/endpoint', (req, res) => {
const redirectURL = shopify.auth.buildEmbeddedAppUrl(req.query.host);
res.redirect(redirectURL);
});
string
| ❗ required
The host
parameter from the Shopify request.
string
The appropriate Shopify address to redirect to.