Skip to content

Commit

Permalink
[DEV-1770] Fixed Getalby
Browse files Browse the repository at this point in the history
  • Loading branch information
davidleomay committed Sep 1, 2023
1 parent eacdc4c commit 958328a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
9 changes: 6 additions & 3 deletions app/screens/LoginScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,13 @@ const LoginScreen = () => {
setValue("refCode", params?.code);

// token login
if (params?.token) {
if (params?.token || params?.session) {
setIsAutoLogin(true);
setIsProcessing(true);

resetParams();

SessionService.tokenLogin(params?.token)
SessionService.tokenLogin(params?.token ?? params?.session)
.then(() => nav.navigate(Routes.Home))
.catch(() => {
nav.navigate(Routes.Error, { screenType: ErrorScreenType.LOGIN_FAILED });
Expand Down Expand Up @@ -191,6 +191,7 @@ const LoginScreen = () => {
code: undefined,
headless: undefined,
token: undefined,
session: undefined,
});
};

Expand Down Expand Up @@ -219,7 +220,9 @@ const LoginScreen = () => {
return handleSubmit(onSubmit(false))();
} else if (info?.node?.alias?.includes("getalby.com")) {
// log in with Alby
return openUrl(`${Environment.api.baseUrl}/alby?redirect_uri=${window.location.origin}/login`, false);
const url = new URL(`${Environment.api.baseUrl}/auth/alby`);
url.searchParams.set("redirectUri", `${window.location.origin}/login`);
return openUrl(url.toString(), false);
}

setIsProcessing(false);
Expand Down
16 changes: 0 additions & 16 deletions infrastructure/dfx-payment.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,6 @@ resource cdnEndpoint 'Microsoft.Cdn/profiles/endpoints@2020-09-01' = {
]
deliveryPolicy: {
rules: [
{
name: 'Global'
order: 0
conditions: []
actions: [
{
name: 'ModifyRequestHeader'
parameters: {
'@odata.type': '#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters'
headerAction: 'Append'
headerName: 'X-Frame-Options'
value: 'deny'
}
}
]
}
{
name: 'HttpToHttps'
order: 1
Expand Down

0 comments on commit 958328a

Please sign in to comment.