Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication failed. #55

Closed
Geolim4 opened this issue Jan 7, 2024 · 2 comments
Closed

Authentication failed. #55

Geolim4 opened this issue Jan 7, 2024 · 2 comments

Comments

@Geolim4
Copy link

Geolim4 commented Jan 7, 2024

Hello,

Despite the configuration I made:
https://github.com/PHPSocialNetwork/mongodb-extension/blob/3f1b40d40d2716d55a5e4802f53b25d98be31f0e/.github/workflows/php.yml#L29

I still get the "Authentication failed." error:
https://github.com/PHPSocialNetwork/mongodb-extension/actions/runs/7436987014/job/20234095568

I checked the DNS passed to the MongodbClient constructor and it look good to me: mongodb://test:phpfastcache@127.0.0.1/pfc_test

What am I missing ?

@Geolim4
Copy link
Author

Geolim4 commented Jan 7, 2024

Found it:

If you run the tests with the admin user, even if you specify the /databaseName in the DSN, you need to provide ?authSource=admin at the end of the DSN...

Closed :)

@Geolim4 Geolim4 closed this as completed Jan 7, 2024
@marcuspoehls
Copy link
Member

@Geolim4 Hey Georges, great you figured it out yourself 🙂 and thank you for sharing your solution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants