@@ -6,7 +6,6 @@ import { checkBlacklist } from '@libs-private/utils/security';
66import { get } from 'lodash' ;
77import { IncomingMessage } from 'http' ;
88
9-
109export const publicRoute = ( ) => ( {
1110 name : 'public' ,
1211 path : '/public' ,
@@ -30,6 +29,7 @@ export const publicRoute = () => ({
3029 'v1.stripe-webhook.handleWebhook' ,
3130
3231 'v3.users.mockOauth' ,
32+ 'v3.users.provider' ,
3333 ] ,
3434
3535 aliases : {
@@ -56,7 +56,7 @@ export const publicRoute = () => ({
5656 'POST v1/embed-tokens/update' : 'v1.embed-tokens.public.update' ,
5757 'POST v1/stripe-webhook' : 'v1.stripe-webhook.handleWebhook' ,
5858 'POST v3/users/mock-oauth' : 'v3.users.mockOauth' ,
59-
59+ 'GET v3/users/oauth/provider/:provider' : 'v3.users.provider' ,
6060 } ,
6161
6262 cors : {
@@ -119,17 +119,23 @@ export const publicRoute = () => ({
119119 json : {
120120 strict : false ,
121121 limit : '5MB' ,
122- verify : ( req : IncomingMessage , res : any , buf : Buffer , encoding : string | undefined ) => {
122+ verify : (
123+ req : IncomingMessage ,
124+ res : any ,
125+ buf : Buffer ,
126+ encoding : string | undefined
127+ ) => {
123128 if ( req . url === '/v1/stripe-webhook' ) {
124- const validEncoding : BufferEncoding = encoding as BufferEncoding || 'utf8' ;
129+ const validEncoding : BufferEncoding =
130+ ( encoding as BufferEncoding ) || 'utf8' ;
125131 ( req as any ) . rawBody = buf . toString ( validEncoding ) ;
126132 }
127133 } ,
128134 } ,
129135 urlencoded : {
130136 extended : true ,
131137 limit : '1MB' ,
132- }
138+ } ,
133139 } ,
134140
135141 // Mapping policy setting. More info: https://moleculer.services/docs/0.14/moleculer-web.html#Mapping-policy
0 commit comments