based on your 401 error screenshot, you are making call to supabase url for auth. I believe
@User example (and great work btw! ) is not yet merged (
https://github.com/supabase/gotrue/pull/282) so you can't call it agains supabase.co/auth url. If you look at his live demo when clicking login you will see it makes a call to his GoTrue server that has this functionality.
https://gotrue.harryet.xyz/nonce