Salesforce-Shopify Multipass Integration (APEX)

gannocal
New Member
2 0 1

I'm trying to link a Salesforce community page to our Shopify storefront using SSO. I've worked through the Multipass documentation and built an APEX class to generate a token.

 

My confusion lies in the redirect. The documentation says to perform a GET request. Then redirect the user. 

 

If I simply redirect the user to *store*/account/login/multipass/<token> then I get a "Invalid Multipass Request" page. If I pull an HTML GET request, then the body of the request links to the login page.

 

It seems to me that the most likely case is that the token is invalid, but I can't seem to find an error in the code after hours of debugging and comparison to the PHP and Ruby samples.

 

Apex Multipass Token GeneratorApex Multipass Token Generator

0 Likes
SBD_
Shopify Staff
Shopify Staff
1043 141 183

Hey @gannocal 

 

The docs say to "trigger a HTTP GET request to your Shopify store". I.e. you can just redirect them to <store>/account/login/multipass/<token>, no AJAX required.

 

It seems to me that the most likely case is that the token is invalid, but I can't seem to find an error in the code after hours of debugging and comparison to the PHP and Ruby samples.

This sounds like the culprit. Are you able to share the results of your debugging? If you compare the example implementation to your code (with the same keys and customer data), does the token match?

 

 

0 Likes
gannocal
New Member
2 0 1

Hey Scott!

 

Just wanted to say thank you for the input. I loaded up the sample code in ruby and noticed the ISO formatting in APEX wasn't correcting for the timezone.

 

Problem solved!

 

Cheers,

 

Caleb