Welcome Guest, Not a member yet? Register   Sign In
User authentication
#4

(03-13-2020, 05:45 AM)Parker1090 Wrote: But how would you handle this in an API scenario? Would the case be to fail them in the filter (e.g. return 401), or would it be done elsewhere? If it's the former, what's the correct way to handle this and halt the request going any further?

I’m not sure what’s the best way to do it, but I would fail the request in the filter. Maybe use failUnauthorized() from the API Response Trait class.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply


Messages In This Thread
User authentication - by Parker1090 - 03-08-2020, 08:28 AM
RE: User authentication - by includebeer - 03-08-2020, 11:34 AM
RE: User authentication - by Parker1090 - 03-13-2020, 05:45 AM
RE: User authentication - by includebeer - 03-14-2020, 06:53 AM
RE: User authentication - by Parker1090 - 03-16-2020, 01:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB