Skip to content

Commit

Permalink
Auth unhide (#1888)
Browse files Browse the repository at this point in the history
## Describe your changes
Keep the domains the same for login

## Issue ticket number and link

## Checklist before requesting a review (skip if just adding/editing
APIs & templates)
- [ ] I added tests, otherwise the reason is: 
- [ ] I added observability, otherwise the reason is:
- [ ] I added analytics, otherwise the reason is:
  • Loading branch information
khaliqgant committed Mar 20, 2024
1 parent 39dee4b commit c233a7e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
4 changes: 2 additions & 2 deletions packages/server/lib/controllers/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ class AuthController {
const oAuthUrl = workos?.userManagement.getAuthorizationUrl({
clientId: process.env['WORKOS_CLIENT_ID'] || '',
provider,
redirectUri: `${getBaseUrl()}/api/v1/login/callback`
redirectUri: `${getBasePublicUrl()}/api/v1/login/callback`
});

res.send({ url: oAuthUrl });
Expand Down Expand Up @@ -381,7 +381,7 @@ class AuthController {
const oAuthUrl = workos?.userManagement.getAuthorizationUrl({
clientId: process.env['WORKOS_CLIENT_ID'] || '',
provider,
redirectUri: `${getBaseUrl()}/api/v1/login/callback`,
redirectUri: `${getBasePublicUrl()}/api/v1/login/callback`,
state: JSON.stringify(inviteParams)
});

Expand Down
4 changes: 1 addition & 3 deletions packages/webapp/src/pages/InviteSignup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ export default function InviteSignup() {

const { token } = useParams();

const tempShowAuth = false;

useEffect(() => {
const getInvite = async () => {
const res = await getInvitee(token as string);
Expand Down Expand Up @@ -133,7 +131,7 @@ export default function InviteSignup() {
{serverErrorMessage && <p className="mt-6 place-self-center text-sm text-red-600">{serverErrorMessage}</p>}
</div>
</form>
{MANAGED_AUTH_ENABLED && tempShowAuth && (
{MANAGED_AUTH_ENABLED && (
<>
<div className="flex items-center justify-center my-4 text-xs">
<div className="border-t border-gray-600 flex-grow mr-7"></div>
Expand Down
4 changes: 1 addition & 3 deletions packages/webapp/src/pages/Signin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ export default function Signin() {
}
};

const tempShowAuth = false;

return (
<>
<DefaultLayout>
Expand Down Expand Up @@ -89,7 +87,7 @@ export default function Signin() {
{serverErrorMessage && <p className="mt-6 place-self-center text-sm text-red-600">{serverErrorMessage}</p>}
</div>

{MANAGED_AUTH_ENABLED && tempShowAuth && (
{MANAGED_AUTH_ENABLED && (
<>
<div className="flex items-center justify-center my-4 text-xs">
<div className="border-t border-gray-600 flex-grow mr-7"></div>
Expand Down
4 changes: 1 addition & 3 deletions packages/webapp/src/pages/Signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ export default function Signup() {
}
};

const tempShowAuth = false;

return (
<>
<DefaultLayout>
Expand Down Expand Up @@ -110,7 +108,7 @@ export default function Signup() {
{serverErrorMessage && <p className="mt-6 place-self-center text-sm text-red-600">{serverErrorMessage}</p>}
</div>
</form>
{MANAGED_AUTH_ENABLED && tempShowAuth && (
{MANAGED_AUTH_ENABLED && (
<>
<div className="flex items-center justify-center my-4 text-xs">
<div className="border-t border-gray-600 flex-grow mr-7"></div>
Expand Down

0 comments on commit c233a7e

Please sign in to comment.