Function oauth_login
Source pub async fn oauth_login(
db: &Database,
app_config: &AppConfig,
auth_config: &AuthConfig,
provider_name: String,
query_param_code: Option<String>,
query_param_error: Option<String>,
query_param_state: Option<String>,
) -> Result<(String, String), (u16, String)>
Expand description
§Panics
- Could not update the user oauth2 link
§Errors
- 501 - This oauth provider is not supported
- 400 - Invalid code
- 500 - Internal server error (could be a lot of things)
TODO: don’t panic
TODO: this function is too long, break it up into smaller parts