/users/by-external/ not working

Is your external_id 1, or is your user_id 1? Can you show a dump of your single_sign_on_records table? Also, external_id is all about using another site as the SSO provider; if you’re using Discourse as the SSO provider, as you stated, you don’t need external_id because you’d use the user_id from Discourse to lookup the user.