Ooopppss
I exposed jwt tokens in github
Shelf-fish Devlog #8
Yepp I exposed my jwt tokens in my github, but trust me I knew what I was doing, those tokens are long expired, my backend isn’t published yet and i will change the exposed passwords, which was 12345678, cuz why not
Anyways I have done a lot things, in the last devlog, i had connected the frontend with the backend and made the detection endpoint work with the frontend. i had to manually type the authentication tokens cuz i had not set up auth in the frontend, but I have now fixed this
Here’s what I have done:
- Created
tokenStorage.js- it handles getting the tokens, saving them and clearing them using expo-secure-store, i used expo-secure-store cuz it saves tokens in keychains rather than files that makes them much less likely to leak or read by anyone/app/malwares - Created
authService.js- this one handles send the get and post requests for registering, logging in and getting current user data - Added interceptors to Api, i am using a single api instance using
axios.create()across the app, so i have added interceptors to attach auth tokens and check if they are valid or expired - Created the login and register screens, they don’t look good now but will work on the ui after i get everything set up, I will make everything exist first, the designs can be taken care of afterwards
- I also created a new api route at ‘/users’, this one is responsible for getting user data, right now it just gets the user info but I think i would also make it update it…
- I also added navigation using
react-navigation
What’s next ?
- I haven’t finished the home screen yet, well nothing is finished yet, but the home screen just greets the user, i will add buttons to navigate to camera and upload components
- I will also create the item related pages, that will show all items and let the user create items after detecting the product
The images:
They look soo bad but as I said I will make everything exist first and then make the ui good
- The register page
- The login page, it’s not even filled yet, cuz i want to add text and a logo, i will create a logo too lol i forgot about that
- The home page, empty page with a greeting and a sign out button, it was made to check if everything is working or not
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.