-
SummaryI am following this guide and other docs to understand how to create an Auth middleware. https://mattrighetti.com/2025/05/03/authentication-with-axum Towards the end, they use cookies to send both a refresh token and jwt/access token. But this is for browser based apps. For a mobile based app without cookies, how can I accomplish this/should I? I am currently doing this
axum version0.8.4 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
This doesn't seem like axum-specific question and more like how to do authentication in a mobile app. Which I don't really have experience with but I'm sure there will be a lot of other resources on that. |
Beta Was this translation helpful? Give feedback.
Again, you're asking questions about security of a system, not how to do something in axum.
When I disregard the use-case and focus just in getting the header values, you can also implement the
Header
trait for the custom header you're interested in and use twoTypedHeader
s. But what you wrote works for getting a non-standard header too.