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

[TIC-902] Add picture_url to MigrateUserParams #30

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

itailevi98
Copy link
Contributor

Background

The picture_url request parameter was missing from the library. It has now been added as an optional value.

Note: This adds a non-backwards compatible change to the MigrateUserRequest type for adding picture_url.

Example Usage

import (
	...
	"github.com/propelauth/propelauth-go/pkg/models"
)
apiKey := "API KEY"
authUrl := "AUTH URL"

client, err := propelauth.InitBaseAuth(authUrl, apiKey, nil)
if err != nil {
	panic(err)
}

EmailConfirmed := true
Enabled := true
Username := "testuser2"
FirstName := "Test"
LastName := "User"
Email := "[email protected]"
PictureUrl := "https://placekitten.com/200/300"

res, err := client.MigrateUserFromExternalSource(models.MigrateUserParams{
	EmailConfirmed: &EmailConfirmed,
	Enabled:        &Enabled,
	Username:       &Username,
	FirstName:      &FirstName,
	LastName:       &LastName,
	Email:          Email,
	PictureUrl:     &PictureUrl,
})
if err != nil {
	panic(err)
}

Copy link
Contributor

@mrmauer mrmauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

Copy link
Contributor

@mrmauer mrmauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@itailevi98 itailevi98 merged commit 95eef15 into main Jun 17, 2024
9 checks passed
@itailevi98 itailevi98 deleted the TIC-902/Add-picture-url-to-migrate-user-request branch June 17, 2024 20:49
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

Successfully merging this pull request may close these issues.

2 participants