I am working on an application, where any user can login into my application through Salesforce. As per mentioned in below url, We can use
https://login.salesforce.com or for sandbox
For the authentication, and to get access token I am using
https://login.salesforce.com but, if I also have an account on
https://test.salesforce.com and try to login, It does not allow me as my account was registered on sandbox url, test salesforce. Now, Any type of user, We can have for the login through SalesForce, How can I achieve this thing ?