Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

how to login with Shopify customerAccessTokenCreate

how to login with Shopify customerAccessTokenCreate

lokki54
Shopify Partner
55 0 15

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
55 0 15

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

guimei
Shopify Partner
18 0 5

Did you find a solution?

lokki54
Shopify Partner
55 0 15

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

 

The client is lost to me and Shopify. 

ShopifyDevSup
Shopify Staff
1453 238 523

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
55 0 15

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?