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
Observe that the account was created successfully (see description for "problem")
Note: I'm not using OMNIAUTH_ONLY=true, which would prevent this API from being usable. The use-case here is that I don't want to do SSO via OAUTH, I just want to direct users to a different registration flow.
Expected behaviour
Account should maybe not be able to be created?
Actual behaviour
Account is created
Detailed description
The use case here is that I want to direct users to a specific website to signup, such that I can give them an additional onboarding experience beyond the stock mastodon experience.
Whilst in the current implementation, it's not technically a bug, it does mean that mobile apps could bypass this additional onboarding experience.
I think the solution here is to allow a server owner to set value like: API_REGISTRATION_TOKEN and verify that that matches when calling Api::V1::AccountsController#create
This allows for something to still create accounts via the API, but prevents non-authorised parties from creating accounts via the API, instead forcing them to use and respect the registrations.url presented in /api/v2/instance, instead of bypassing it.
Mastodon instance
local development server
Mastodon version
main
Technical details
If this is happening on your own Mastodon server, please fill out those:
Ruby version: v3.4.1
Node.js version: v22
The text was updated successfully, but these errors were encountered:
ThisIsMissEm
changed the title
Account creation possible via API when SSO_ACCOUNT_SIGN_UP set
Account creation possible via API when SSO_ACCOUNT_SIGN_UP is set
Jan 22, 2025
Steps to reproduce the problem
Using:
write:accounts
scopewrite:accounts
, using the client_id and client_secret from step 1.POST http://localhost:3000/api/v1/accounts
with:Note: I'm not using
OMNIAUTH_ONLY=true
, which would prevent this API from being usable. The use-case here is that I don't want to do SSO via OAUTH, I just want to direct users to a different registration flow.Expected behaviour
Account should maybe not be able to be created?
Actual behaviour
Account is created
Detailed description
The use case here is that I want to direct users to a specific website to signup, such that I can give them an additional onboarding experience beyond the stock mastodon experience.
Whilst in the current implementation, it's not technically a bug, it does mean that mobile apps could bypass this additional onboarding experience.
I think the solution here is to allow a server owner to set value like:
API_REGISTRATION_TOKEN
and verify that that matches when callingApi::V1::AccountsController#create
This allows for something to still create accounts via the API, but prevents non-authorised parties from creating accounts via the API, instead forcing them to use and respect the
registrations.url
presented in/api/v2/instance
, instead of bypassing it.Mastodon instance
local development server
Mastodon version
main
Technical details
If this is happening on your own Mastodon server, please fill out those:
The text was updated successfully, but these errors were encountered: