gnikyt / laravel-shopify

A full-featured Laravel package for aiding in Shopify App development
MIT License
1.24k stars 374 forks source link

I am having hmac code in URL after authenticate #1184

Closed talkwithdeveloper closed 2 years ago

talkwithdeveloper commented 2 years ago

For bug reporting only! If you're posting a feature request or discussion, please ignore.

Expected Behavior

i am expecting it shouldn't show hmac code inside URL. ( [https://shopifycurrencyapp.cordcomtechnologies.com/?hmac=84dc3ac9950610a1ac5842554dd152e832de94a59f9c25bb84e3ee6d2eaf&host=FwcHN0b3JlZm9yYXBwLm15c2hvcGlmeS5jb20vYWRtaW4&shop=p.myshopify.com&timestamp=1659168387]

Expecting URL (https://shopifycurrencyapp.cordcomtechnologies.com)

Current Behavior

AFter app authenticate redirect to outside shopify admin its good but goes with hmac code that shouldn't be add to in uRL

please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

"php": "^7.2.5|^8.0",
    "fideloper/proxy": "^4.4",
    "fruitcake/laravel-cors": "^2.0",
    "guzzlehttp/guzzle": "^6.3.1|^7.0.1",
    "laravel/framework": "^7.29",
    "laravel/tinker": "^2.5",
    "laravel/ui": "2.*",
    "maatwebsite/excel": "^3.1",
    "osiset/laravel-shopify": "^14.0"

Failure Logs

Please include any relevant log snippets or files here.

Kyon147 commented 2 years ago

@talkwithdeveloper I'm unable to replicate this.

Does your app authenticate properly and land on the app homepage?

talkwithdeveloper commented 2 years ago

yes

Kyon147 commented 2 years ago

It looks to me as a left over from the previous route - as you need to use AppBridge to update the route, you can just make sure to rewrite the history yourself that way.

talkwithdeveloper commented 2 years ago

is it possible can we make a zoom call ?

Kyon147 commented 2 years ago

Hi @talkwithdeveloper,

Sadly I don't have time but you just need to update the route when you land on the homepage to overwrite the last history.

I tend to just put a watcher in the root app of Vue to update it anytime my root changes. This means you don't need to manually sire it every view change.

 if (window.AppBridge){
                var History = actions.History;
                var history = History.create(window.AppBridge);
                history.dispatch(History.Action.PUSH, to.path);
}

You could try something like that but I have seen other apps where this happens, so it's not always limited to this package.

Kyon147 commented 2 years ago

I've taken a look at this and can confirm it is because of needing to use appbridge to update the history sometimes.