Emelia
Oh, and you might want to link to the package & example in the cookbook repo from your leaflet :)
1 2
Emelia
I think the most complicated part for me (using browser not expo) was getting the react context Provider right; had a really weird bug last night that I ended up solving with a useRef on the client, even though the client shouldn't have been changing.
1 2
Samuel
absolutely - was gonna make this guide from scratch but it's such a PITA to get right that just using `npx giget` from the cookbook is by far the easiest way to do it
1
Emelia
Yeah, I was playing with it from scratch yesterday because I needed to brush up on my react skills, just because I hadn't needed much if any react over the past few years, but obviously I'd need it for certain things.
1 1
Emelia
Plus I just really wanted to figure out an account switcher thing like social-app has, but without using the deprecated (?) session manager API that social-app does. And I got it working!
1
mark
haven't been able to get this to work with android, I seem to succeed in the actual req but the auth flow never successfully closes the out the popup and returns to the app.
1
Tyler Fisher
Gave this a shot today and got all the way to the OAuth callback after authenticating with my PDS. Something is trying to timeout and can't. I've tried to trace down where exactly this is happening but I'm getting a bit lost. As far as I can tell it's within the oauth-client-expo library?
A generic ATProto OAuth login screen with an error at the bottom that reads:

AbortSignal.timeout is not a function (it is undefined) 1
Samuel
ah yeah sorry about this, React Native’s abort signal polyfill is missing this
2
Tyler Fisher
Ah, seeing the discussion about this in the React Native issues now. Thanks for the helpful tutorial though! This is farther than I've ever gotten with Expo. Is there a way for me to supplement the polyfill to get this fully functional?
1 1
Samuel
you can use abortcontroller-polyfill, but to use that you also need to polyfill DOMException iirc you can do this: global.DOMException = Error
1 1
Tyler Fisher
Seems like there are some other pieces of the AbortSignal that don't work even when polyfilled (throwIfAborted, for example) but this isn't really your problem. Thanks!
1