# Device Authorization Flow not Maintaining Session

**URL:** <https://community.auth0.com/t/device-authorization-flow-not-maintaining-session/169088>\
**Category:** Get Help\
**Tags:** login-experience, new-universal-login-experience\
**Created:** [January 17, 2025, 7:49pm UTC](https://community.auth0.com/t/device-authorization-flow-not-maintaining-session/169088 "2025-01-17T19:49:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![brgzingler](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/brgzingler/32/59788_2.png) [@brgzingler](https://community.auth0.com/u/brgzingler)\
**Post date:** [January 17, 2025, 7:49pm UTC](https://community.auth0.com/t/device-authorization-flow-not-maintaining-session/169088/1 "2025-01-17T19:49:24Z")

</div>

How do I maintain the Auth0 session on the device that displays the authorization URL? It does successfully get the session using webAuth.checkSession if I do it within the same browser, which leads me to believe it isn’t possible for a phone to login and the device to store that session.

---

<div class="post-metadata">

**Author:** ![sumansaurav](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sumansaurav/32/70627_2.png) [@sumansaurav](https://community.auth0.com/u/sumansaurav)\
**Post date:** [January 21, 2025, 5:59am UTC](https://community.auth0.com/t/device-authorization-flow-not-maintaining-session/169088/2 "2025-01-21T05:59:28Z")

</div>

Hi @brgzingler ,

I understand you’re trying to maintain an Auth0 session across different devices - specifically between a phone where the login happens and another device that needs to maintain that session.

You’re correct in your observation. This is fundamentally challenging because:

1. Auth0’s `checkSession` works within the same browser context because it relies on browser cookies/storage
2. The authorization flow happening on the phone creates a session specific to that device/browser

But I am curious to know, what use-case or experience you trying to solve?

---

<div class="post-metadata">

**Author:** ![brgzingler](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/brgzingler/32/59788_2.png) [@brgzingler](https://community.auth0.com/u/brgzingler)\
**Post date:** [January 21, 2025, 4:59pm UTC](https://community.auth0.com/t/device-authorization-flow-not-maintaining-session/169088/3 "2025-01-21T16:59:00Z")

</div>

@sumansaurav I am trying to create a QR code login flow for a display that is running a web app. When users login on their device, I want the session to persist on the display, ideally across subdomains as well meaning we would need cookies. I was hoping for some sort of function in the auth0 SDK to exchange the access token to create a session, but so far my solution has been to just store the id\_token, expires\_at and refresh\_token in local storage, and then just check expires\_at to see if the users session is over. When it is over, I use rotating refresh tokens to create a new session. I am not sure if local storage is the correct option for this however.

---

<div class="post-metadata">

**Author:** ![sumansaurav](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sumansaurav/32/70627_2.png) [@sumansaurav](https://community.auth0.com/u/sumansaurav)\
**Post date:** [January 21, 2025, 6:46pm UTC](https://community.auth0.com/t/device-authorization-flow-not-maintaining-session/169088/4 "2025-01-21T18:46:05Z")

</div>

Hi @brgzingler ,

If I am understanding correctly, you are trying to implement Client-Initiated Backchannel Authentication Flow.

Look at this documentation and let me know if this fits your use case.

 ![image](https://global.discourse-cdn.com/auth0/original/3X/f/1/f1e0af2dd6d5b6a7ec026e6ed1608f7c97f99760.png)

> **[Client-Initiated Backchannel Authentication Flow](https://auth0.com/docs/get-started/authentication-and-authorization-flow/client-initiated-backchannel-authentication-flow)**
>
> Learn how the Client-Initiated Backchannel Authentication Flow works.

> **[User Authentication with CIBA](https://auth0.com/docs/get-started/authentication-and-authorization-flow/client-initiated-backchannel-authentication-flow/user-authentication-with-ciba)**
>
> Learn how to authenticate users with the Client-Initiated Backchannel Authentication Flow.

---

<div class="post-metadata">

**Author:** ![brgzingler](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/brgzingler/32/59788_2.png) [@brgzingler](https://community.auth0.com/u/brgzingler)\
**Post date:** [January 21, 2025, 9:01pm UTC](https://community.auth0.com/t/device-authorization-flow-not-maintaining-session/169088/5 "2025-01-21T21:01:16Z")

</div>

I’m not sure this is quite what I am looking for. This isn’t for a mobile app so I have no way of sending push notifications; there must be a QR code that the user can scan with a device to authenticate when the user presses sign in on the display, similar to how Roku apps authenticate. This is confusing to me because there is surely a way to do what I’m trying to do with the Device Authorization Flow. The only difference is that I am doing it on a website in the browser, not in an app. Thank you for the response, though!

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [January 31, 2025, 6:03pm UTC](https://community.auth0.com/t/device-authorization-flow-not-maintaining-session/169088/6 "2025-01-31T18:03:55Z")

</div>

Hi team!

This is a heads-up that we’re hosting an [Ask Me Anything (AMA) session dedicated to Auth0 sessions, refresh tokens, and the Management API](https://community.auth0.com/t/feb-12-auth0-community-ask-me-anything-auth0-sessions-and-refresh-tokens/174853). Our product experts will be on hand **February 12, 2025, from 8 AM to 10 AM PST** to answer all your questions—no matter how basic or advanced they may be! You can submit your queries anytime from **now until February 11** , and we’ll provide detailed written answers during the live event.

This is a fantastic opportunity to learn best practices around session management, refresh token rotation, and the Management API. Plus, everyone who participates gets **points and a special badge** just for joining in on the fun. 🎉

If you have any burning questions (or even casual curiosities!), feel free to drop them in [this thread](https://community.auth0.com/t/feb-12-auth0-community-ask-me-anything-auth0-sessions-and-refresh-tokens/174853). We can’t wait to see what you’re working on and how we can help you optimize your Auth0 setup. See you there!

[Auth0 Community Ask Me Anything: Auth0 Sessions and Refresh Tokens](https://community.auth0.com/t/feb-12-auth0-community-ask-me-anything-auth0-sessions-and-refresh-tokens/174853)
