## Is your feature request related to a problem?

Currently if you login with SAML and you don't have an account on the PostHog instance one of two things happen: a) either a new account is created **if the email matches the domain whitelist** or b) you get turned down at the door. Yet after some thought, the point of SAML is that you manage user provisioning in a separate centralized system, so we shouldn't have the extra domain check. 

## Describe the solution you'd like

If a user logins through SAML and their account doesn't exist, create it automatically, regardless of whether it matches the domain whitelist.


## Describe alternatives you've considered

Keeping as is.

## Additional context

There's a complicating factor which is that SAML login is instance-based yet user signup is organization-based, so there's the edge case of an instance having multiple orgs. Should the user then be signed up to all organizations?

#### *Thank you* for your feature request – we love each and every one!

posthog/api/signup.py
from typing import Any, Dict, Optional, Union, cast
import posthoganalytics
from django import forms
from django.conf import settings
from django.contrib.auth import login, password_validation
from django.core.exceptions import ValidationError
from django.db import IntegrityError, transaction
from django.shortcuts import redirect, render
from django.urls.base import reverse
from rest_framework import exceptions, generics, permissions, response, serializers, validators
from sentry_sdk import capture_exception
from social_core.pipeline.partial import partial
from social_django.strategy import DjangoStrategy
from posthog.api.shared import UserBasicSerializer
from posthog.demo import create_demo_team
from posthog.event_usage import report_user_joined_organization, report_user_signed_up
from posthog.models import Organization, Team, User
from posthog.models.organization import OrganizationInvite
from posthog.permissions import CanCreateOrg
from posthog.tasks import user_identify
from posthog.utils import get_can_create_org, mask_email_address
class SignupSerializer(serializers.Serializer):