how to login with Shopify customerAccessTokenCreate

lokki54
Shopify Partner
45 0 9

Hello.

In the background, I manage to get the storefront_access_token and with it ask API to get me 

customerAccessToken (using customer email and password)
response

 

{
    "data": {
        "customerAccessTokenCreate": {
            "customerAccessToken": {
                "accessToken": "34e32c24sfdsa2c075d7d2ddf00000",
                "expiresAt": "2023-03-14T13:54:56Z"
            },
            "customerUserErrors": []
        }
    }
}

 

 

 How do I actually login customer on the Shopify store storefront? Simple redirect in same browser requires customer to enter credentials
login.png

Replies 6 (6)

lokki54
Shopify Partner
45 0 9

Wow. Nobody reply..... forum is dead

guimei
Shopify Partner
18 0 5

Did you find a solution?

lokki54
Shopify Partner
45 0 9

No, I did not. Nobody replies and no support even for partners.

 

The client is lost to me and Shopify. 

ShopifyDevSup
Shopify Staff
1376 229 481

Hi @lokki54,

 

The [customerAccessTokenCreate mutation] creates an accessToken which is used for modifying the Customer object via the Storefront API and is not related to logging in to the Online Store channel.

 

For logging in to the Online Store channel [Multipass] is available for stores on the Plus plan.

 

Hope you have a great day

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

lokki54
Shopify Partner
45 0 9

Thank you ShopifyDevSup. 

guimei
Shopify Partner
18 0 5

I can get the accessToken by this methods,but I don't how to use it in shopfiy store website? set cookie? or other methods? I'm a frontend developer. Can cookies be set like other normal websites?