Shopify / shopify-frontend-template-react

MIT License
132 stars 61 forks source link

App Bridge v4 migration guide auth flow broken #275

Closed Arkansio closed 4 months ago

Arkansio commented 4 months ago

Issue summary

I migrated from App Bridge v3 to App Bridge v4, problem is, authentification doesn't work anymore, I'm using it in complementary the template with shopify app express. When the session exist in the database no problem, but when session has to be created there the problem. Also I noticed there's no call at the ExitIframe at all. I don't know what's not working. I just know that session is invalid.

Expected behavior

It should create a session and just work.

Actual behavior

I got redirected on a NotFound page

Steps to reproduce the problem

  1. Migrate to App Bridge v4

Reduced test case

Specifications

Thanks for your help. I'm going crazy on this problem.

Arkansio commented 4 months ago

My bad, it was due to the vite plugin :

import { createHtmlPlugin } from 'vite-plugin-html';

It took me days to realise. I added it following the need to change the variable in the index.html in a clean way. I never suspected it was that, because even when removing the variable and keeping the plugin it still didn't work. But it seems that just the plugin itself mess everything up. Well, I guess I should train my debug skills, because I literally took 4 days to understand it. Sorry.