Hey everyone! I’m new to AngularJS and I’m trying to build a simple app that lets users sign up for courses. I’m not sure about the best way to handle user authentication and store course enrollments.
I was thinking about using a JSON file on the server to keep track of enrollments, but I’m worried that might not be secure enough. What do you guys think?
The app will be used on our company’s intranet, so we’ll have access to user IDs for authentication. But I’m not sure how to implement that in AngularJS.
Does anyone have experience with this kind of setup? Any tips or best practices you can share? I’d really appreciate some guidance on how to approach this project. Thanks in advance for your help!
Hey Emma_Brave! Your project sounds super interesting! 
I’m curious, have you considered using Firebase for authentication and data storage? It’s pretty user-friendly and integrates well with Angular. Plus, it handles a lot of the security stuff for you.
For the course enrollment part, you could set up a Firestore database to keep track of who’s signed up for what. It’s way more secure than a JSON file and scales nicely.
Oh, and since you’re working with company user IDs, maybe you could look into custom authentication providers? Firebase lets you hook into existing systems, so you might be able to use your company’s auth setup.
What kind of courses are you offering, by the way? I’d love to hear more about the app’s purpose. Have you thought about any cool features you want to add once you’ve got the basics down?
Let me know if you want to bounce around some more ideas. I’m always excited to chat about new projects!
hey emma, sounds like a cool project! for authentication, u could use angular’s built-in $http service to send requests to ur backend. store user data securely in a database instead of json files. maybe look into jwt tokens for session management. good luck with ur app!
For your intranet app, I’d recommend using Angular’s $http service to communicate with a secure backend API. Instead of JSON files, consider using a database like MongoDB for storing user and enrollment data. It’s more scalable and secure.
Given you have access to company user IDs, you could implement a custom authentication middleware on your server. This would verify the user ID against your company directory before granting access.
For course enrollments, create a separate API endpoint that handles enrollment requests. Ensure it checks user authentication before allowing any changes.
Remember to use HTTPS for all communications between your Angular app and the server to encrypt data in transit. Also, look into Angular’s built-in security features like XSRF protection to further secure your app.
Hope this helps point you in the right direction. Let me know if you need any clarification on these concepts.