Issue with account oauth silent fail on Cloudflare, Galaxy, and Iron Router


The Meteor package accounts-github works great locally in dev mode. However in production It requires the user to go through the auth redirect twice. The failure only happens from a ‘cold start’.

If the user has never visited the page: load page - > clicks login - > redirect to github -> authenticate -> redirect back to meteor app - > Meteor.userId() is null
However on a second attempt, will successfully log in.

Anyone seen an error like this?


It’s probably unrelated to cloudflare, since I disabled the CDN, and user’s still don’t authenticate on the first try.

Could it be Iron router?