mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-11 21:22:14 +00:00
chore: merge back origin/main
This commit is contained in:
@@ -45,6 +45,9 @@ services:
|
||||
ZITADEL_API_INTERNAL_URL: http://zitadel:8080
|
||||
WRITE_ENVIRONMENT_FILE: /apps/login/.env.local
|
||||
WRITE_TEST_ENVIRONMENT_FILE: /acceptance/tests/.env.local
|
||||
SINK_EMAIL_INTERNAL_URL: http://sink:3333/email
|
||||
SINK_SMS_INTERNAL_URL: http://sink:3333/sms
|
||||
SINK_NOTIFICATION_URL: http://localhost:3333/notification
|
||||
volumes:
|
||||
- "./pat:/pat"
|
||||
- "../apps/login:/apps/login"
|
||||
@@ -56,7 +59,7 @@ services:
|
||||
sink:
|
||||
image: golang:1.19-alpine
|
||||
container_name: sink
|
||||
command: go run /sink/main.go -port 3333
|
||||
command: go run /sink/main.go -port '3333' -email '/email' -sms '/sms' -notification '/notification'
|
||||
ports:
|
||||
- 3333:3333
|
||||
volumes:
|
||||
|
||||
@@ -8,9 +8,9 @@ ZITADEL_API_DOMAIN="${ZITADEL_API_DOMAIN:-localhost}"
|
||||
ZITADEL_API_PORT="${ZITADEL_API_PORT:-8080}"
|
||||
ZITADEL_API_URL="${ZITADEL_API_URL:-${ZITADEL_API_PROTOCOL}://${ZITADEL_API_DOMAIN}:${ZITADEL_API_PORT}}"
|
||||
ZITADEL_API_INTERNAL_URL="${ZITADEL_API_INTERNAL_URL:-${ZITADEL_API_URL}}"
|
||||
SINK_EMAIL_URL="${SINK_EMAIL_URL:-"http://localhost:3333/email"}}"
|
||||
SINK_SMS_URL="${SINK_SMS_URL:-"http://localhost:3333/sms"}}"
|
||||
SINK_NOTIFICATION_URL="${SINK_SMS_URL:-"http://localhost:3333/notification"}}"
|
||||
SINK_EMAIL_INTERNAL_URL="${SINK_EMAIL_INTERNAL_URL:-"http://sink:3333/email"}"
|
||||
SINK_SMS_INTERNAL_URL="${SINK_SMS_INTERNAL_URL:-"http://sink:3333/sms"}"
|
||||
SINK_NOTIFICATION_URL="${SINK_NOTIFICATION_URL:-"http://localhost:3333/notification"}"
|
||||
|
||||
if [ -z "${PAT}" ]; then
|
||||
echo "Reading PAT from file ${PAT_FILE}"
|
||||
@@ -56,7 +56,7 @@ SMSHTTP_RESPONSE=$(curl -s --request POST \
|
||||
--header "Authorization: Bearer ${PAT}" \
|
||||
--header "Host: ${ZITADEL_API_DOMAIN}" \
|
||||
--header "Content-Type: application/json" \
|
||||
-d "{\"endpoint\": \"${SINK_SMS_URL}\", \"description\": \"test\"}")
|
||||
-d "{\"endpoint\": \"${SINK_SMS_INTERNAL_URL}\", \"description\": \"test\"}")
|
||||
echo "Received SMS HTTP response: ${SMSHTTP_RESPONSE}"
|
||||
|
||||
SMSHTTP_ID=$(echo ${SMSHTTP_RESPONSE} | jq -r '. | .id')
|
||||
@@ -78,7 +78,7 @@ EMAILHTTP_RESPONSE=$(curl -s --request POST \
|
||||
--header "Authorization: Bearer ${PAT}" \
|
||||
--header "Host: ${ZITADEL_API_DOMAIN}" \
|
||||
--header "Content-Type: application/json" \
|
||||
-d "{\"endpoint\": \"${SINK_EMAIL_URL}\", \"description\": \"test\"}")
|
||||
-d "{\"endpoint\": \"${SINK_EMAIL_INTERNAL_URL}\", \"description\": \"test\"}")
|
||||
echo "Received Email HTTP response: ${EMAILHTTP_RESPONSE}"
|
||||
|
||||
EMAILHTTP_ID=$(echo ${EMAILHTTP_RESPONSE} | jq -r '. | .id')
|
||||
|
||||
@@ -4,7 +4,7 @@ import { getCodeFromSink } from "./sink";
|
||||
|
||||
export async function codeFromSink(page: Page, key: string) {
|
||||
// wait for send of the code
|
||||
await page.waitForTimeout(2000);
|
||||
await page.waitForTimeout(3000);
|
||||
const c = await getCodeFromSink(key);
|
||||
await code(page, c);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import axios from "axios";
|
||||
export async function getCodeFromSink(key: string): Promise<any> {
|
||||
try {
|
||||
const response = await axios.post(
|
||||
process.env.SINK_NOTIFICATION_URL,
|
||||
process.env.SINK_NOTIFICATION_URL!,
|
||||
{
|
||||
recipient: key,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user