During oAuth process it's good to set state param to authorize url for security. When I checked Überauth Shopify https://github.com/kodehort/ueberauth_shopify/blob/master/lib/ueberauth/strategy/shopify.ex#L88 it is sent to shopify.
But I don't understand how I need to set this state param in my Phoenix application that Shopify would get it. Any suggestions?
You supply
statein the URL you're passing to Ueberauth (In the same way,scopesare passed as well)Depending on your router setup, with the default being:
you supply
scopesandstateby redirecting your user to the specified auth URL:/auth/shopify?scopes=read_orders%20read_products&state=yourSuperSecretStateor without any scopes:
/auth/shopify?state=yourSuperSecretState