Coder Social home page Coder Social logo

obytes / react-native-auth Goto Github PK

View Code? Open in Web Editor NEW
40.0 11.0 3.0 30 KB

Authentication in React Native, Easy, Secure, and Reusable solution

TypeScript 98.23% JavaScript 1.77%
react-native react reactjs authentication react-authentication react-native-authentication

react-native-auth's Introduction

react-native-auth's People

Contributors

yjose avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-auth's Issues

React Navigation

Im trying to use it with React Navigation

import { AuthProvider, useAuth } from './auth';
const { status, userToken } = useAuth();

<AuthProvider>
    <ApolloProvider client={client}> 
    <NavigationContainer>
      <Stack.Navigator>      
    {userToken == null ? (
      // No token found, user isn't signed in, login screen should be showed
      <Stack.Screen name="SignIn" component={SignInScreen} />
    ) : (
       // User is signed in, so should see Home Screen
      <Stack.Screen name="Home" component={HomeScreen} />
    ) 
      }
      
  </Stack.Navigator>
      </NavigationContainer>  
      </ApolloProvider>
      </AuthProvider>

I also display on both screens userToken content.

I see that content of userToken is changing (content jwt token after login, a null after log out), but screen is always the same.
Can you help me with that?

Kind Regards,
Oskar

Stale link for auth blog in Readme.md

In the current readme, the full post link points to https://obytes.com/blog/authentication-in-react-native-easy-secure-and-reusable-solution but since the endpoint has changed, it should now point to https://www.obytes.com/blog/react-native-auth

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.