# Making Login with a customer with store-api and going to admin/login redirect

**URL:** <https://forum.shopware.com/t/making-login-with-a-customer-with-store-api-and-going-to-admin-login-redirect/95237>\
**Category:** Shopware 6 (English)\
**Created:** [11. Juli 2022 um 15:16 UTC](https://forum.shopware.com/t/making-login-with-a-customer-with-store-api-and-going-to-admin-login-redirect/95237 "2022-07-11T15:16:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![josemanuel](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@josemanuel](https://forum.shopware.com/u/josemanuel)\
**Post date:** [11. Juli 2022 um 15:16 UTC](https://forum.shopware.com/t/making-login-with-a-customer-with-store-api-and-going-to-admin-login-redirect/95237/1 "2022-07-11T15:16:37Z")

</div>

Hello, friends. I am with the „magic“ of coding plugins…

I want to know if possible how to redirect correctly after a valid custom login. to the URL accoun/login  
It worked for me in shopware 5.  
but I am recoding the plugin I made for shopware 6 ( code must be different )

I managed to redirect using :

```auto
        use \Symfony\Component\HttpFoundation\RedirectResponse;

       $response = new RedirectResponse('frontend.account.login.page');
        $response->send();

```

but I want to use My **ContextToken** (I am already logged)  
**to see the green screen (Logged) in the view. but it appears as If I am not logged…**

I make a request to ‚[http://localhost/store-api/account/login‘](http://localhost/store-api/account/login%E2%80%98), ( that returns OK. and the context token)

my plugin starts in the ROUTE : localhost/voxelcare-login-control. and then I must go to  
localhost/admin/login ( with the green screen of logged) after the login.

---

<div class="post-metadata">

**Author:** ![hesse-wct](https://avatars.discourse-cdn.com/v4/letter/h/a183cd/32.png) [@hesse-wct](https://forum.shopware.com/u/hesse-wct)\
**Post date:** [25. November 2024 um 11:08 UTC](https://forum.shopware.com/t/making-login-with-a-customer-with-store-api-and-going-to-admin-login-redirect/95237/2 "2024-11-25T11:08:23Z")

</div>

You managed to get it done? Even if post is 2 years old, I’m stuck there as well.
