How to assign member role directly after signup is complete in code?

Thanks for the elaborate response. This thread was the first one I found when researching which is why I commented on it. However, I did find some of these others ones that you mentioned later on.

Thanks