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

(03-08-2020, 11:34 AM)includebeer Wrote: In CI4, a filter would be the way to go: https://codeigniter4.github.io/userguide...lters.html
You can check out how Lonnie did it in Myth Auth: https://github.com/lonnieezell/myth-auth

Thanks includebeer - that's really helpful!

I notice even in the example of Myth Auth they redirect if a user isn't logged in, which is fine with a standard user login process. 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?

Sorry for the questions, just trying to get my head around it!
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