# 'Sign the user up' with redirect in API workflow doesn't set cookies

**URL:** <https://forum.bubble.io/t/sign-the-user-up-with-redirect-in-api-workflow-doesnt-set-cookies/320083>\
**Category:** APIs\
**Created:** [April 29, 2024, 7:47pm UTC](https://forum.bubble.io/t/sign-the-user-up-with-redirect-in-api-workflow-doesnt-set-cookies/320083 "2024-04-29T19:47:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![achiodiego](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/achiodiego/32/214804_2.png) [@achiodiego](https://forum.bubble.io/u/achiodiego)\
**Post date:** [April 29, 2024, 7:47pm UTC](https://forum.bubble.io/t/sign-the-user-up-with-redirect-in-api-workflow-doesnt-set-cookies/320083/1 "2024-04-29T19:47:51Z")

</div>

My goal is to create a sign-up form for our app. The form lives on a web page outside Bubble.

It looks like Bubble isn’t logging the user in after signup; cookies are not set. How can I perform the login?

## What I did

I created a backend API workflow which a new user can POST to:

 ![Screenshot 2024-04-29 at 15.38.11](https://us1.discourse-cdn.com/bubble/original/3X/4/f/4fbdc80ab7db0c7df481bc944cb60973dce18346.png)

The workflow contains one ‘Sign the user up’ action:

 ![Screenshot 2024-04-29 at 15.38.20](https://us1.discourse-cdn.com/bubble/original/3X/f/f/ff5dc6a7930a6fc7c4e63a12a8f842f49fa6e459.png)

To trigger the process, I wrote an HTML form which causes the browser to POST to the workflow via page navigation:

```html
<form method="POST" action="https://app.traduality.com/version-test/api/1.1/wf/sign-up-test">
  <button>Sign up</button>
</form>

```

## What I see

The API workflow executes and creates the user. The workflow responds with HTTP 302 (redirect). The browser redirects to`https://app.traduality.com/version-test/?access_token=bus%7C171441 ***************x22************** &user_id=17144 *********x6957********* &expires=86400` (index). When this new page loads, the user is not logged in.

## What I want/expect

The API workflow executes and creates the user. The workflow responds with HTTP 302 (redirect). The browser redirects to`https://app.traduality.com/version-test/` (index). When this new page loads, the user is logged in.

## What I tried

I tried a ‘Sign the user up’ action and a ‘Log the user in’ option. Neither one sets the necessary cookies to log the user in.

I _think_ this method used to work about two months ago. (I recently discovered an unrelated problem with our signup form, and in the process of fixing it, I discovered the problem I describe in this post.)

---

<div class="post-metadata">

**Author:** ![achiodiego](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/achiodiego/32/214804_2.png) [@achiodiego](https://forum.bubble.io/u/achiodiego)\
**Post date:** [May 17, 2024, 8:32pm UTC](https://forum.bubble.io/t/sign-the-user-up-with-redirect-in-api-workflow-doesnt-set-cookies/320083/2 "2024-05-17T20:32:56Z")

</div>

I tested today and everything seems to be working as expected now. Perhaps the bug has been fix on Bubble’s end, or perhaps I messed up in my testing before.
