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

Registration flow creates user with appropriate group #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="https://unpkg.com/truevault@0.2.0/build/index.js"></script>
<script src="https://unpkg.com/truevault@0.4.0/build/index.js"></script>
<script src="tv_config.js"></script>
<script src="index.js"></script>
</body>
Expand Down
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ async function loginUser(username, password, mfaCode){
}

async function registerUser(username, password) {
tvUser = await createUserTvClient.createUser(username, password);
await createUserTvClient.addUsersToGroup(TV_CREDENTIALS.GROUP_ID, [tvUser.id]);
tvUser = await createUserTvClient.createUser(username, password, {}, [TV_CREDENTIALS.GROUP_ID]);
tvUserClient = new TrueVaultClient(tvUser.access_token);
}

Expand Down