mirror of
https://github.com/twofas/2fas-server.git
synced 2024-12-12 12:09:56 +01:00
16 lines
244 B
Go
16 lines
244 B
Go
package pass
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
func getDeviceID() string {
|
|
deviceID := uuid.NewString()
|
|
if deviceIDFromEnv := os.Getenv("TEST_DEVICE_ID"); deviceIDFromEnv != "" {
|
|
deviceID = deviceIDFromEnv
|
|
}
|
|
return deviceID
|
|
}
|