Sorry but I'm not sure where the praise for this article is coming from. The code doesn't and could not work.
There's an await inside a non-async function and auth is undefined.
The flow works fine but I'm not sure why the simple errors haven't been fixed in 2 years?