Skip to content

Commit 88c259b

Browse files
authored
Merge pull request #129 from jordanopensource/development
Update github and authelia provider options
2 parents 4ccac5b + cf5e758 commit 88c259b

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

.sample.env

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ NUXT_JOSA_O_AUTH_WELL_KNOWN=authwellknownsiteurl
1212
NUXT_API_URL=nuhaapiurl
1313
#samplr#NUXT_AUTH_SECRET='add new secert'
1414
NUXT_AUTH_SECRET='add new secert'
15-
#samplr#AUTH_ORIGIN='http://localhost:3000'
1615
AUTH_ORIGIN="http://localhost:3000"
1716
#samplr#NUXT_MONGODB_URI='mongodb://<user>:<pass>@localhost:<port>'
1817
NUXT_MONGODB_URI='mongodb://<user>:<pass>@localhost:<port>'
19-
#samplr#NUXT_LIST_MONK_API_URL='https://listmonk.api.something'
20-
NUXT_LIST_MONK_API_URL='https://listmonk.api.something'
21-
#samplr#NUXT_LIST_MONK_USER='someone'
22-
NUXT_LIST_MONK_USER='someone'
23-
#samplr#NUXT_LIST_MONK_PASSWORD='oooh_top_secret'
24-
NUXT_LIST_MONK_PASSWORD='oooh_top_secret'
25-
#samplr#NUXT_LIST_MONK_EN_TEMPLATE_ID='somenumber'
26-
NUXT_LIST_MONK_EN_TEMPLATE_ID='somenumber'
27-
#samplr#NUXT_LIST_MONK_AR_TEMPLATE_ID='somenumber'
28-
NUXT_LIST_MONK_AR_TEMPLATE_ID='somenumber'
29-
#samplr#NUXT_LIST_MONK_LIST_ID='somenumber'
30-
NUXT_LIST_MONK_LIST_ID="21"
18+
#samplr#NUXT_SMTP_HOST=host
19+
NUXT_SMTP_HOST=host
20+
#samplr#NUXT_SMTP_USER=smtpuser
21+
NUXT_SMTP_USER=smtpuser
22+
#samplr#NUXT_SMTP_PASSWORD=somepass
23+
NUXT_SMTP_PASSWORD=somepass
24+
NUXT_LIST_MONK_API_URL="https://monk.josa.ngo/api"
25+
#samplr#NUXT_LIST_MONK_USER=monkusername
26+
NUXT_LIST_MONK_USER=monkusername
27+
#samplr#NUXT_LIST_MONK_PASSWORD=somepass
28+
NUXT_LIST_MONK_PASSWORD=somepass
29+
NUXT_LIST_MONK_EN_TEMPLATE_ID="13"
30+
NUXT_LIST_MONK_AR_TEMPLATE_ID="14"

server/api/auth/[...].ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ export default NuxtAuthHandler({
2222
GithubProvider.default({
2323
clientId: runtimeConfig.github.clientId,
2424
clientSecret: runtimeConfig.github.clientSecret,
25+
allowDangerousEmailAccountLinking: true,
2526
}),
2627
{
2728
id: 'authelia',
2829
name: 'Authelia',
2930
type: 'oauth',
3031
clientId: runtimeConfig.josaOAuth.clientId,
3132
clientSecret: runtimeConfig.josaOAuth.clientSecret,
33+
allowDangerousEmailAccountLinking: true,
3234
wellKnown: runtimeConfig.josaOAuth.wellKnown,
3335
authorization: { params: { scope: 'openid email profile' } },
3436
idToken: true,
@@ -53,7 +55,7 @@ export default NuxtAuthHandler({
5355
const locale =
5456
callbackUrl?.substring(
5557
_url.origin.length + 1,
56-
_url.origin.length + 3, // length of the locale's code
58+
_url.origin.length + 3 // length of the locale's code
5759
) === 'ar'
5860
? 'ar'
5961
: 'en'

0 commit comments

Comments
 (0)