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

Native Auth E2E test generate email locally - copy #2571

Closed
wants to merge 3 commits into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import java.time.LocalDateTime
import java.time.ZoneOffset
import java.time.ZonedDateTime
import java.time.format.DateTimeFormatter
import java.util.UUID


/**
Expand All @@ -50,7 +51,12 @@ class TemporaryEmailService {
private val retryDelayMs: Long = 4000
private val newEmailCutoff = 5.0

fun generateRandomEmailAddress(): String {
fun generateRandomEmailAddressLocally(): String {
val randomId = UUID.randomUUID().toString().substring(0, 8)
return "[email protected]"
}

fun generateRandomEmailAddressWithAPI(): String {
val generatedUsers = api.generateRandomEmailAddress()
if (generatedUsers.isEmpty()) {
throw ApiException("No generated users returned from TemporaryEmailApi")
Expand Down
Loading