You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
I am experiencing a discrepancy between the Supabase documentation and the behavior in my Python environment when trying to create an MFA challenge. According to the documentation (both for JavaScript and Python), only the factor_id is required to create an MFA challenge, but in my Python code, the SDK raises an error stating that the channel field is missing.
This issue only happens in the containerized environment, not in my local development setup. On my local machine, the same code works without issues, but in the Docker container, it fails with a KeyError on the channel field.
Steps to Reproduce:
Python SDK: Using Supabase's Python SDK, I am trying to create an MFA challenge.
Environment: The issue occurs when running the code inside a Docker container. The same code works without problems in my local environment.
Code snippet (relevant portion):
python
Copiar código
response = supabase.auth.sign_in_with_password(credentials)
if response.user.factors:
factor_id = response.user.factors[0].id # Extract the factor ID
data = {
"factor_id": factor_id # Only sending factor_id as per documentation
}
try:
res = supabase.auth.mfa.challenge(data) # This line raises a 'channel' KeyError in the container
challenge_id = res.id
return Response({
"mfa": True,
"factor_id": factor_id,
"challenge_id": challenge_id
}, status=status.HTTP_200_OK)
except Exception as e:
print(f"Error: {str(e)}")
return Response({'detail': str(e)}, status=status.HTTP_400_BAD_REQUEST)
Expected Behavior:
The MFA challenge should be created using just the factor_id, as per the documentation. In the JavaScript SDK documentation, it clearly shows that only factorId is required, and the Python SDK documentation mirrors this expectation.
Actual Behavior:
In the Docker container, the mfa.challenge call raises the following error:
vbnet
Copiar código
KeyError: 'channel'
This error suggests that the channel field is required, which contradicts the documentation. This issue does not occur in my local environment—the same code runs perfectly fine.
The text was updated successfully, but these errors were encountered:
Description:
I am experiencing a discrepancy between the Supabase documentation and the behavior in my Python environment when trying to create an MFA challenge. According to the documentation (both for JavaScript and Python), only the factor_id is required to create an MFA challenge, but in my Python code, the SDK raises an error stating that the channel field is missing.
This issue only happens in the containerized environment, not in my local development setup. On my local machine, the same code works without issues, but in the Docker container, it fails with a KeyError on the channel field.
Steps to Reproduce:
Python SDK: Using Supabase's Python SDK, I am trying to create an MFA challenge.
Environment: The issue occurs when running the code inside a Docker container. The same code works without problems in my local environment.
Code snippet (relevant portion):
python
Copiar código
response = supabase.auth.sign_in_with_password(credentials)
if response.user.factors:
factor_id = response.user.factors[0].id # Extract the factor ID
Expected Behavior:
The MFA challenge should be created using just the factor_id, as per the documentation. In the JavaScript SDK documentation, it clearly shows that only factorId is required, and the Python SDK documentation mirrors this expectation.
Actual Behavior:
In the Docker container, the mfa.challenge call raises the following error:
vbnet
Copiar código
KeyError: 'channel'
This error suggests that the channel field is required, which contradicts the documentation. This issue does not occur in my local environment—the same code runs perfectly fine.
The text was updated successfully, but these errors were encountered: