# Authentication and Authorization

**URL:** <https://forum.codewithmosh.com/t/authentication-and-authorization/1533>\
**Category:** React Native\
**Created:** [December 29, 2020, 2:39pm UTC](https://forum.codewithmosh.com/t/authentication-and-authorization/1533 "2020-12-29T14:39:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mosestosin35](https://avatars.discourse-cdn.com/v4/letter/m/d6d6ee/32.png) [@mosestosin35](https://forum.codewithmosh.com/u/mosestosin35)\
**Post date:** [December 29, 2020, 2:39pm UTC](https://forum.codewithmosh.com/t/authentication-and-authorization/1533/1 "2020-12-29T14:39:19Z")

</div>

I have followed and code along with the instructor up to thie authentication and authorization where I got stuck. The login and register not working after trying different methods. I think I will look for another course to understand authentication and authorization better.

 ![consolelog of result](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/1X/a3365ee3a44dba2f19c638744f0b29f71fa07a3e.png) ![i cannot login|301x500]

---

<div class="post-metadata">

**Author:** ![dpickut](https://avatars.discourse-cdn.com/v4/letter/d/a87d85/32.png) [@dpickut](https://forum.codewithmosh.com/u/dpickut)\
**Post date:** [January 15, 2021, 3:10pm UTC](https://forum.codewithmosh.com/t/authentication-and-authorization/1533/2 "2021-01-15T15:10:45Z")

</div>

The process flow in the course works – I just completed that section a few days ago.

I can’t tell from the screenshot what specific error is creating a problem for you. Maybe if you provide more detail, I or someone else can help.

---

<div class="post-metadata">

**Author:** ![Oybek](https://avatars.discourse-cdn.com/v4/letter/o/35a633/32.png) [@Oybek](https://forum.codewithmosh.com/u/Oybek)\
**Post date:** [May 18, 2021, 9:23am UTC](https://forum.codewithmosh.com/t/authentication-and-authorization/1533/3 "2021-05-18T09:23:03Z")

</div>

try running the code with the below handleSubmit function.  
remove loginFailed state and if(!result.ok) stuff just for now.

`` const handleSubmit = async ({ email, password }) =\> {  
const result = await authApi.login(email, password)  
console.log(result.data)}`

---

<div class="post-metadata">

**Author:** ![bekk](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@bekk](https://forum.codewithmosh.com/u/bekk)\
**Post date:** [May 30, 2021, 3:52pm UTC](https://forum.codewithmosh.com/t/authentication-and-authorization/1533/4 "2021-05-30T15:52:47Z")

</div>

@Oybek are you from Uzbekistan? Do you have contacts?
