{"id":8410,"date":"2024-11-01T14:23:09","date_gmt":"2024-11-01T14:23:09","guid":{"rendered":"https:\/\/minicoursegenerator.com\/?post_type=docs&#038;p=8410"},"modified":"2024-11-01T14:23:09","modified_gmt":"2024-11-01T14:23:09","password":"","slug":"enable-access-with-in-app-authentication","status":"publish","type":"docs","link":"https:\/\/minicoursegenerator.com\/knowledge-base\/enable-access-with-in-app-authentication\/","title":{"rendered":"Enable access with in-app authentication"},"content":{"rendered":"<p>In-app authentication offers you password-less access to the mini-courses in the application in which mini-courses are embedded. You can easily present training modules, exclusive tutorials and mini-courses to paid members and subscribers within your existing application. Integrate Mini Course Generator with your web-app or mobile-app in minutes, creating a seamlessly accessible in-product academy that enriches the engagement with your audience.<\/p>\n<p>Granting access to your learners through in-app authentication differs from embedding mini-courses in that when your mini-courses are integrated in your application, your content can only be reached by <strong>exclusive users of your web or mobile application<\/strong>.<\/p>\n<p>If the situation below matches to your use-case:<\/p>\n<ul>\n<li>you have your own application (not a 3rd party app),<\/li>\n<li>you have access to back-end codes of your application and are able to make changes,<\/li>\n<li>you are looking to use mini-courses in your own application while tracking users data without any additional login,<\/li>\n<li>you want your learners to access your mini-courses through in-app authentication,<\/li>\n<\/ul>\n<p>then contact us through the live chat widget to <strong>get a quote<\/strong>.<\/p>\n<h3>Technical Requirements for In-App Authentication<\/h3>\n<p><em>\ud83d\udc40This feature requires some back-end coding ability.<\/em><\/p>\n<p>When building applications that need to securely pass user data, encryption becomes a vital part of the process. Here&#8217;s an example of how to encrypt user data and generate a magic link for in-app authentication.<\/p>\n<h4>Code Overview<\/h4>\n<pre><code>var CryptoJS = require(\"crypto-js\");\r\nvar collectionId = \"YOUR_COLLECTION_ID\";\r\nvar secretKey = CryptoJS.enc.Utf8.parse(\"YOUR_SECRET_KEY\");\r\nvar courseCode = \"YOUR_COURSE_CODE\"; \/\/ Optional\r\nvar host = \"YOUR_CUSTOM_DOMAIN\"; \/\/ Optional\r\n\r\nfunction encryptData(data) {\r\n    let encryptedBytes = CryptoJS.AES.encrypt(\r\n        CryptoJS.enc.Utf8.parse(JSON.stringify(data)),\r\n        secretKey,\r\n        { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 },\r\n    );\r\n    return encodeURIComponent(encryptedBytes.toString());\r\n}\r\n\r\nlet data = {\r\n    \/\/courseCollectionId: collectionId, \/\/ Optional\r\n    \/\/courseCode: courseCode, \/\/ Optional\r\n    \/\/externalIds: [\"Your external Id 1\", \"Your external Id 2\"], \/\/ Optional (Array)\r\n    \/\/host: host, \/\/ Optional\r\n    \/\/name: \"You can set name surname\", \/\/ Optional\r\n    \/\/email: \"You can set email\", \/\/ Optional\r\n    username: \"You have to set username\",\r\n};\r\n\r\nvar token = encryptData(data);\r\nconsole.log(\"&lt;https:\/\/gateway.minicoursegenerator.com\/api\/learner-auth\/{YOUR_SHOP_ID}\/generate-magic-link?token=${token}&gt;\");\r\n<\/code><\/pre>\n<h4>Key Components<\/h4>\n<ul>\n<li><strong>CryptoJS Library:<\/strong> Used to securely encrypt user data.<\/li>\n<li><strong>Secret Key:<\/strong> This key is used to encrypt the data. Make sure this is stored securely. You can find your secret key in-app authentication part of learner access sample code inside.<\/li>\n<li><strong>Data:<\/strong> Includes essential fields like username and other optional fields such as courseCode, courseCollectionId and host(for custom domain).<\/li>\n<\/ul>\n<p style=\"padding-left: 40px;\">If only the username is provided in data object, the user will be redirected to their profile page. If both the username and courseCollectionId are included, the user will be directed to the collection page. When the username, courseCollectionId, and courseCode are all sent together, the user will be taken directly to the course page.<\/p>\n<p style=\"padding-left: 40px;\">Additionally, if you have defined an External ID for your collections, you can assign the user directly to those collections and direct the user to the profile page by sending externalIds as an array in the data.<\/p>\n<ul>\n<li><strong>Token Generation: <\/strong>The encryptData function takes the user data, encrypts it, and returns a token that can be appended to an API URL for generating magic links.<\/li>\n<\/ul>\n<h4>Usage Example<\/h4>\n<p>Once you generate the token, you can use this API URL in your application for user authentication:<\/p>\n<pre><code>\"&lt;https:\/\/gateway.minicoursegenerator.com\/api\/learner-auth\/{YOUR_SHOP_ID}\/generate-magic-link?token=${token}&gt;\"<\/code><\/pre>\n<p>This URL can be redirected (or embedded in an iframe) to authenticate users securely.<\/p>\n<p>This simple approach ensures that user-specific information is protected when sent across the network for authentication or other purposes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In-app authentication offers you password-less access to the mini-courses in the application in which mini-courses are embedded. You can easily present training modules, exclusive tutorials and mini-courses to paid members and subscribers within your existing application. Integrate Mini Course Generator with your web-app or mobile-app in minutes, creating a seamlessly accessible in-product academy that enriches [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[23],"doc_tag":[],"class_list":["post-8410","docs","type-docs","status-publish","hentry","doc_category-accepting-payments"],"year_month":"2025-12","word_count":582,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"admin","author_nicename":"admin","author_url":"https:\/\/minicoursegenerator.com\/blog\/author\/admin\/"},"doc_category_info":[{"term_name":"Learners' Access","term_url":"https:\/\/minicoursegenerator.com\/knowledge-base-category\/accepting-payments\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>In-App Authentication for Mini Courses | Mini Course Generator<\/title>\n<meta name=\"description\" content=\"Embed mini-courses within your app using in-app authentication in Mini Course Generator. Share micro learning with app users exclusively.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/minicoursegenerator.com\/knowledge-base\/enable-access-with-in-app-authentication\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"In-App Authentication for Mini Courses | Mini Course Generator\" \/>\n<meta property=\"og:description\" content=\"Embed mini-courses within your app using in-app authentication in Mini Course Generator. Share micro learning with app users exclusively.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/minicoursegenerator.com\/knowledge-base\/enable-access-with-in-app-authentication\/\" \/>\n<meta property=\"og:site_name\" content=\"Mini Course Generator\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/MiniCourseGenerator\/\" \/>\n<meta property=\"og:image\" content=\"https:\/\/minicoursegenerator.com\/wp-content\/uploads\/2021\/12\/comp-logo1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"251\" \/>\n\t<meta property=\"og:image:height\" content=\"57\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@minicoursegen\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/minicoursegenerator.com\/knowledge-base\/enable-access-with-in-app-authentication\/\",\"url\":\"https:\/\/minicoursegenerator.com\/knowledge-base\/enable-access-with-in-app-authentication\/\",\"name\":\"In-App Authentication for Mini Courses | Mini Course Generator\",\"isPartOf\":{\"@id\":\"https:\/\/minicoursegenerator.com\/#website\"},\"datePublished\":\"2024-11-01T14:23:09+00:00\",\"description\":\"Embed mini-courses within your app using in-app authentication in Mini Course Generator. Share micro learning with app users exclusively.\",\"breadcrumb\":{\"@id\":\"https:\/\/minicoursegenerator.com\/knowledge-base\/enable-access-with-in-app-authentication\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/minicoursegenerator.com\/knowledge-base\/enable-access-with-in-app-authentication\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/minicoursegenerator.com\/knowledge-base\/enable-access-with-in-app-authentication\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/minicoursegenerator.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Knowledge Base\",\"item\":\"https:\/\/minicoursegenerator.com\/knowledge-base\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enable access with in-app authentication\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/minicoursegenerator.com\/#website\",\"url\":\"https:\/\/minicoursegenerator.com\/\",\"name\":\"Mini Course Generator\",\"description\":\"The simplest and fastest way to create mini-courses\",\"publisher\":{\"@id\":\"https:\/\/minicoursegenerator.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/minicoursegenerator.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/minicoursegenerator.com\/#organization\",\"name\":\"Mini Course Generator\",\"url\":\"https:\/\/minicoursegenerator.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/minicoursegenerator.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/minicoursegenerator.com\/wp-content\/uploads\/2021\/09\/mcg-web-logo-1.svg\",\"contentUrl\":\"https:\/\/minicoursegenerator.com\/wp-content\/uploads\/2021\/09\/mcg-web-logo-1.svg\",\"width\":221,\"height\":49,\"caption\":\"Mini Course Generator\"},\"image\":{\"@id\":\"https:\/\/minicoursegenerator.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"http:\/\/facebook.com\/MiniCourseGenerator\/\",\"https:\/\/x.com\/minicoursegen\",\"https:\/\/www.youtube.com\/channel\/UCZ_Lfax1s8PZH_TUNMjrj7A\",\"https:\/\/www.linkedin.com\/company\/mini-course-generator\",\"https:\/\/www.instagram.com\/minicourse_generator\/\",\"https:\/\/discord.gg\/3p74FyePEf\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"In-App Authentication for Mini Courses | Mini Course Generator","description":"Embed mini-courses within your app using in-app authentication in Mini Course Generator. Share micro learning with app users exclusively.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/minicoursegenerator.com\/knowledge-base\/enable-access-with-in-app-authentication\/","og_locale":"en_US","og_type":"article","og_title":"In-App Authentication for Mini Courses | Mini Course Generator","og_description":"Embed mini-courses within your app using in-app authentication in Mini Course Generator. Share micro learning with app users exclusively.","og_url":"https:\/\/minicoursegenerator.com\/knowledge-base\/enable-access-with-in-app-authentication\/","og_site_name":"Mini Course Generator","article_publisher":"http:\/\/facebook.com\/MiniCourseGenerator\/","og_image":[{"width":251,"height":57,"url":"https:\/\/minicoursegenerator.com\/wp-content\/uploads\/2021\/12\/comp-logo1.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_site":"@minicoursegen","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/minicoursegenerator.com\/knowledge-base\/enable-access-with-in-app-authentication\/","url":"https:\/\/minicoursegenerator.com\/knowledge-base\/enable-access-with-in-app-authentication\/","name":"In-App Authentication for Mini Courses | Mini Course Generator","isPartOf":{"@id":"https:\/\/minicoursegenerator.com\/#website"},"datePublished":"2024-11-01T14:23:09+00:00","description":"Embed mini-courses within your app using in-app authentication in Mini Course Generator. Share micro learning with app users exclusively.","breadcrumb":{"@id":"https:\/\/minicoursegenerator.com\/knowledge-base\/enable-access-with-in-app-authentication\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/minicoursegenerator.com\/knowledge-base\/enable-access-with-in-app-authentication\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/minicoursegenerator.com\/knowledge-base\/enable-access-with-in-app-authentication\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/minicoursegenerator.com\/"},{"@type":"ListItem","position":2,"name":"Knowledge Base","item":"https:\/\/minicoursegenerator.com\/knowledge-base\/"},{"@type":"ListItem","position":3,"name":"Enable access with in-app authentication"}]},{"@type":"WebSite","@id":"https:\/\/minicoursegenerator.com\/#website","url":"https:\/\/minicoursegenerator.com\/","name":"Mini Course Generator","description":"The simplest and fastest way to create mini-courses","publisher":{"@id":"https:\/\/minicoursegenerator.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/minicoursegenerator.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/minicoursegenerator.com\/#organization","name":"Mini Course Generator","url":"https:\/\/minicoursegenerator.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/minicoursegenerator.com\/#\/schema\/logo\/image\/","url":"https:\/\/minicoursegenerator.com\/wp-content\/uploads\/2021\/09\/mcg-web-logo-1.svg","contentUrl":"https:\/\/minicoursegenerator.com\/wp-content\/uploads\/2021\/09\/mcg-web-logo-1.svg","width":221,"height":49,"caption":"Mini Course Generator"},"image":{"@id":"https:\/\/minicoursegenerator.com\/#\/schema\/logo\/image\/"},"sameAs":["http:\/\/facebook.com\/MiniCourseGenerator\/","https:\/\/x.com\/minicoursegen","https:\/\/www.youtube.com\/channel\/UCZ_Lfax1s8PZH_TUNMjrj7A","https:\/\/www.linkedin.com\/company\/mini-course-generator","https:\/\/www.instagram.com\/minicourse_generator\/","https:\/\/discord.gg\/3p74FyePEf"]}]}},"_links":{"self":[{"href":"https:\/\/minicoursegenerator.com\/wp-json\/wp\/v2\/docs\/8410","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/minicoursegenerator.com\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/minicoursegenerator.com\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/minicoursegenerator.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/minicoursegenerator.com\/wp-json\/wp\/v2\/comments?post=8410"}],"version-history":[{"count":2,"href":"https:\/\/minicoursegenerator.com\/wp-json\/wp\/v2\/docs\/8410\/revisions"}],"predecessor-version":[{"id":8412,"href":"https:\/\/minicoursegenerator.com\/wp-json\/wp\/v2\/docs\/8410\/revisions\/8412"}],"wp:attachment":[{"href":"https:\/\/minicoursegenerator.com\/wp-json\/wp\/v2\/media?parent=8410"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/minicoursegenerator.com\/wp-json\/wp\/v2\/doc_category?post=8410"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/minicoursegenerator.com\/wp-json\/wp\/v2\/doc_tag?post=8410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}