I am using mongodb's stitch backend to run an application, and when I try to login as an anonymous user, it throws this error:
failed to log in anonymously: { StitchError: authentication via 'anon-user' is unsupported
at /*****/*****/*****/****/node_modules/mongodb-stitch/dist/node/common.js:29:19
at
at process._tickCallback (internal/process/next_tick.js:160:7)
name: 'StitchError',
response:
Body {
url: '*****',
status: 401,
statusText: 'Unauthorized',
headers: Headers { _headers: [Object] },
ok: false,
body:
Gunzip {
_readableState: [ReadableState],
readable: false,
domain: null,
_events: [Object],
_eventsCount: 4,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: true,
_transformState: [Object],
bytesRead: 81,
_handle: null,
_hadError: false,
_writeState: [Uint32Array],
_outBuffer: ,
_outOffset: 57,
_level: -1,
_strategy: 0,
_chunkSize: 16384,
_flushFlag: 0,
_scheduledFlushFlag: 0,
_origFlushFlag: 0,
_finishFlushFlag: 4,
_info: undefined },
bodyUsed: true,
size: 0,
timeout: 0,
_raw:
[ ],
_abort: false,
_bytes: 57 },
json: { error: 'authentication via \'anon-user\' is unsupported' } }
Items marked with *****
were removed for privacy.
I have anonymous authentication enabled in Stitch Admin Console, but it still throws this error. My app is not even able to perform any operations on the database before this happens, so I know it does not have to do with my app's Rules
.
Is there something I don't know about anonymous auth?
If you know where the mongodb error reference is, that would help as well.
Thanks
I am using mongodb's stitch backend to run an application, and when I try to login as an anonymous user, it throws this error:
failed to log in anonymously: { StitchError: authentication via 'anon-user' is unsupported
at /*****/*****/*****/****/node_modules/mongodb-stitch/dist/node/common.js:29:19
at
at process._tickCallback (internal/process/next_tick.js:160:7)
name: 'StitchError',
response:
Body {
url: '*****',
status: 401,
statusText: 'Unauthorized',
headers: Headers { _headers: [Object] },
ok: false,
body:
Gunzip {
_readableState: [ReadableState],
readable: false,
domain: null,
_events: [Object],
_eventsCount: 4,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: true,
_transformState: [Object],
bytesRead: 81,
_handle: null,
_hadError: false,
_writeState: [Uint32Array],
_outBuffer: ,
_outOffset: 57,
_level: -1,
_strategy: 0,
_chunkSize: 16384,
_flushFlag: 0,
_scheduledFlushFlag: 0,
_origFlushFlag: 0,
_finishFlushFlag: 4,
_info: undefined },
bodyUsed: true,
size: 0,
timeout: 0,
_raw:
[ ],
_abort: false,
_bytes: 57 },
json: { error: 'authentication via \'anon-user\' is unsupported' } }
Items marked with *****
were removed for privacy.
I have anonymous authentication enabled in Stitch Admin Console, but it still throws this error. My app is not even able to perform any operations on the database before this happens, so I know it does not have to do with my app's Rules
.
Is there something I don't know about anonymous auth?
If you know where the mongodb error reference is, that would help as well.
Thanks
Share Improve this question edited Mar 28, 2018 at 19:54 Spaceface16518 asked Mar 7, 2018 at 3:16 Spaceface16518Spaceface16518 1013 silver badges8 bronze badges 4- Can you email me your client app ID or Atlas group ID to [email protected] so I can check your app out? It's probably a simple fix. – edaniels Commented Mar 8, 2018 at 0:00
- @edaniels sorry I didn't respond for so long. I'll send it now! – Spaceface16518 Commented Mar 28, 2018 at 19:48
- Have you tried turning on anonymous login via Stitch Apps > Users > Providers > Allow users to login anonymously? – Kevin Commented Jul 11, 2018 at 8:07
- Hi, I am having same problem, have already check down the app auth method for the stitch app and is ok. – LucasRT Commented Sep 23, 2019 at 4:30
3 Answers
Reset to default 8FROM
https://github.com/Spaceface16518/Converse/issues/22
"I think you have to deploy it in the deploy session"
First you must allow anonymous login
Allow Users to login anonymously
Click on the review and deploy changes at the top of the stitch UI
Review and deploy changes
You need to go Stitch Apps > Users > Providers > Allow users to login anonymously and enable that option.