-
Notifications
You must be signed in to change notification settings - Fork 1
BI-2540 - Update bi_user Table for Alternate OAuth Provider(s) #473
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
Conversation
dmeidlin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Micronaut server fails to start up because the ProgramDAO is not recognized as a bean when the GermplasmDAO tries to inject it. Prior to this a maven clean install was done with the flyway migration, which correctly picked up the orcid_id to oauth_id column change in the bi_user table. After seeing the error, I wiped the bi_api docker volume as a precaution and tried again with a fresh install, same error with the Micronaut server. Also, the error goes away when reverting back to a different branch.
Not sure where the error lies, especially since neither ProgramDAOImpl.java class or ProgramDAO.java interface have been modified.
Thanks for testing, I'll try to reproduce and troubleshoot this issue. |
dmeidlin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the change made to FLYWAY_LOCATIONS=filesystem:src/main/java/org/breedinginsight/db/migration,filesystem:src/main/resources/db/migration bi-api was able to compile after the flyway migrations. The login flow using Github via the Deltabreed UI works as expected.
d4f4d22 to
73aa948
Compare
Description
Story: BI-2540
Most of the changes are renaming ORCID to OAuthID. Non-trivial changes are:
biUser.setOauthProvider(oAuthProvider);sets the OAuth provider on the bi_user when the account is activated.V1.34.0__rename-orcid.sql, renamesorcidtooauth_idand adds a columnoauth_providerthat defaults to'orcid'.In application.yml, I disabled flyway's out-of-order migrations, as this was causing some issues.I reverted this change, the pom.xml change below should make this unnecessary.These changes go along with the bi-web PR for BI-2539, and this PR includes the changes from the bi-api PR for BI-2539.
bi-docker-stack PR: Breeding-Insight/bi-docker-stack#58
Dependencies
The
feature/BI-2539branch of bi-web, which adds UI elements to sign in with GitHub.Testing
Make sure bi-web is running with
VUE_APP_ALTERNATE_AUTHENTICATION_ENABLED=true.Add the following variables for bi-api.
Try adding new users and opening the activation link (found in the email or debug logs) in a private window or separate browser. Test signing in with GitHub and ORCID.
Check the
bi_usertable, ensure that theoauth_providercolumn contains'github'or'orcid'as expected.Checklist: