data icon indicating copy to clipboard operation
data copied to clipboard

documentation feedback: my knowledge gap on adding authentication

Open eflanagan0 opened this issue 10 months ago • 1 comments

👋 👋 👋 👋 Hello! I wanted to share my experience on trying to follow the WIP documentation and getting stuck. No action needed. I figured this would be useful for future adopters coming from prior paradigms.

I am a long-time ember-data user. Today I was refactoring an ember application data fetching function and thought to try RequestManager. I was able to quickly subclass it and use the provided Fetch handler.

I struggled to answer the question: "How do I add authentication headers to Fetch handler? Or do I need to create a new Handler?" I didn't end up finding an answer so just stopped for now.

Hopefully this issue can serve as one how-to or recipe use-case to address when the time comes. I categorize this topic in the same group as this thread: https://discuss.emberjs.com/t/seeking-guidance-on-modern-ember-data-practices-for-a-new-project/21380

eflanagan0 avatar Apr 16 '25 14:04 eflanagan0

It's hidden in the repo here, but maybe this guide can shed some light on how to add authentication https://github.com/emberjs/data/blob/main/guides/requests/examples/1-auth.md

Jopie01 avatar Apr 16 '25 14:04 Jopie01

@eflanagan0 you would create a new handler. With what @Jopie01 linked (updated and deployed version here https://docs.warp-drive.io/guides/misc/3-requests/examples/1-auth) I think we can close this, though the request/handler docs on the new site haven't been filled out much yet and happy to use feedback to focus effort and improvements.

runspired avatar Jul 05 '25 07:07 runspired