Nephilus-notes / nephilus-music

0 stars 0 forks source link

add Authentication #7

Open Nephilus-notes opened 9 months ago

Nephilus-notes commented 9 months ago

Users can create accounts without social login by giving their email, username, and password, which will be stored securely in the server.

Done - Our user model is linked with the Django authentication User and we have a flow and pages for the user submitting their information and connecting with the API to save the user object in the database

Nephilus-notes commented 9 months ago

Model for user should be made leveraging the django abstractUser model to add the custom fields of streak_max(int), streak_starts(json blob/dict), and chatbot conversations (json blob/dict).

Nephilus-notes commented 9 months ago

Also needs to have a json blob for the user_info field (all the information we grab from the account setup forms.

Primary django User attributes : username password email first_name last_name

Nephilus-notes commented 9 months ago

In building the api service in C# I had to get very specific about a lot of things and had to morph the user object. What I have on this side is now: int id string username string email string firstname string lastname int streakmax list<dictionary<string, int>> streaks (You shouldn't need to worry about the exact makeup except when parsing) list<dictionary<int, string>> Chatbot Conversations object strugglesInfo:

public bool BrokenUp { get; set; } = false; public List BreakUpDates { get; set; } = new List(); public bool SelfEsteem { get; set; } = false; public bool Loneliness { get; set; } = false; public bool NegativeThoughts { get; set; } = false; public bool NormalRoutine { get; set; } = false; public bool Sleep { get; set; } = false; public bool Motivation { get; set; } = false; public bool SomethingElse { get; set; } = false; public string OtherStruggleText { get; set; } = ""; object SupportInfo: public bool EmotionalSupport { get; set; } = false; public bool CommunitySupport { get; set; } = false; public bool NoContact { get; set; } = false; public bool SafeVentingSpace { get; set; } = false; public bool OtherSupport { get; set; } = false; public string OtherSupportText { get; set; } = "";

Feel free to reach out if you need help or want to chat about how to transfer that into the database