Pricing Blog

Supabase Connect - Signin Proxy

  • stockton_f-1399852276180320387

    Stockton

    1 month ago

    Hey @Max
    In one of my usecases my app is embeded as an iframe within another application. I would like to utilize the sign in component but the proxy seems to be causing some confilicts with setting cookies in the response.

    Could you add an attribute on the signin components to be able to turn on and off the proxy?
    1399853499470057563-image.png
  • stockton_f-1399853528746299462

    Stockton

    1 month ago

    When trying to authenticate while in an iframe the cookies (in chrome) have a yellow highlight indicating issues with samesite attributes.

    Immediately after signin I am also redirected back to the signing. Further identifying that the cookie is not readable.
  • max.kayr-1399934024461455492

    Max

    1 month ago

    Hmm... I don't think that the proxy is the issue. It is the SameSite=Strict. This should be set to None. How did you handle that before the package, did you use cookies?
  • stockton_f-1399964679333216318

    Stockton

    1 month ago

    Yes it is the same site=strict.

    The idea with the proxy is so I can handle setting the cookie via my own proxy.

    But maybe there’s another way to solve the issue?

    Doesn’t the package use cookies?When not accessed via iframe I assumed it used cookies
  • max.kayr-1399973814707945596

    Max

    1 month ago

    It does use cookies. But they are set via the Set HTTP only cookie action. So it will be set to your NC project's domain by default
  • max.kayr-1399974205143126068

    Max

    1 month ago

    Not sure if your use case is one that the package should support. I believe it means rewriting the logic. @Andreas Møller what do you think?
  • andreasmoller-1399978348679266366

    Andreas Møller

    1 month ago

    Browsers do not send cookies when the request is sent from an iframe. That is why you need the browser plugin for nordcraft
  • max.kayr-1399981962814292079

    Max

    1 month ago

    Is that so? 🧐 I wasn't aware. Thank you!
  • stockton_f-1400112373490253875

    Stockton

    1 month ago

    So can the package also support local storage?
  • max.kayr-1400130196404965526

    Max

    1 month ago

    It would mean a rework of the package. It is @Andreas Møller's package, so he has to decide.
  • stockton_f-1400216731670151359

    Stockton

    1 month ago

    pretty please 🙏